<?php

/**
 * Per-model AI token pricing used ONLY by the Developer Testing Portal to show an
 * *estimated* dollar cost beside the token counts (DeveloperController::testOcr).
 *
 * Rates are USD per 1,000,000 tokens. These are estimates — update them to your
 * negotiated / current provider rates. Nothing else in the app reads this file;
 * production billing uses the OCR-credit system in Dataverse, not these numbers.
 *
 * `models` keys are matched case-insensitively as a SUBSTRING of the model label
 * the Function App returns (cr6f2_aimodel / engine label), first match wins — so
 * suffixed labels like "gpt-5-mini-syhc-predict-medium (fallback)" still resolve
 * to the "gpt-5-mini" entry. Order from most-specific to least-specific.
 */

return [
    'currency' => 'USD',

    'models' => [
        // Gemini 2.5 Flash — default invoice OCR engine.
        'gemini-2.5-flash' => ['input' => 0.30, 'cached' => 0.075, 'output' => 2.50],
        'gemini'           => ['input' => 0.30, 'cached' => 0.075, 'output' => 2.50],

        // Azure OpenAI GPT-5-mini — OCR fallback + default code-mapping deployment.
        'gpt-5-mini'       => ['input' => 0.25, 'cached' => 0.025, 'output' => 2.00],
        'gpt-5'            => ['input' => 1.25, 'cached' => 0.125, 'output' => 10.00],

        // Azure OpenAI GPT-4o — legacy code-mapping deployment.
        'gpt-4o'           => ['input' => 2.50, 'cached' => 1.25,  'output' => 10.00],
    ],

    // Used when no model key matches — cost reports as 0 (so an unknown model is
    // visibly "unpriced" rather than silently mis-priced).
    'default' => ['input' => 0.0, 'cached' => 0.0, 'output' => 0.0],
];
