//! Billing — delegates to agent crate.

use crate::AppService;
use crate::error::AppError;
use uuid::Uuid;

impl AppService {
    pub async fn record_ai_usage(
        &self,
        project_uid: Uuid,
        model_id: Uuid,
        input_tokens: i64,
        output_tokens: i64,
    ) -> Result<agent::billing::BillingRecord, AppError> {
        Ok(agent::billing::record_ai_usage(
            &self.db,
            project_uid,
            model_id,
            input_tokens,
            output_tokens,
        )
        .await?)
    }
}
