Skip to content

Configuration ​

Publish the config file to customize:

bash
php artisan vendor:publish --tag=ai-meter-config
KeyDefaultPurpose
enabledtrueMaster switch.
route.prefix / route.middlewareai-meter / ['web','auth']Dashboard routing.
route.domainnullServe the dashboard on a dedicated domain.
gateviewAiMeterGate checked when defined.
features.dashboard / runs / apitrue / true / falseToggle the dashboard, Runs tab, and JSON budget API.
recording.store_iotruePersist (redacted) prompt/response text.
recording.redact / max_io_charstrue / 8000Scrub secrets; truncate.
pricing.currency / fx_rateUSD / nullDisplay currency + USD→local conversion.
pricing.unknown_model{input:1,output:3}Fallback price per 1M tokens.
pricing.prices[]Override/extend the bundled price book (wins over everything).
pricing.prices_pathnullApp-owned price-book JSON, loaded above the bundled table.
pricing.update.sourcepackage book URLSource for ai-meter:update-prices.
adapters.laravel_ai / adapters.neurondisabledAuto-instrumentation adapters.
budgets[]Spend ceilings (scope, period, limit, action).
alerts80% / 100%Threshold alert notifications.
spend_store.driverdatabasedatabase (SUM per request) or cache (Redis counters).
runs.max_tool_calls / max_wall_clock25 / 300Default runaway-loop caps.
scope.defaultuserHow ai.budget attributes spend when no scope is passed.
prune.keep_days90Retention for ai-meter:prune.
per_page25Dashboard page size.

See the other guide pages for the behaviour behind each group: budgets & alerts, auto-instrumentation, commands.

Released under the MIT License.