Skip to content

[Feature]: Manual price override for models without pricing metadata #3667

Description

@nordz0r

Area

Catalog / models

What are you trying to accomplish?

I want to manually set or override the price (input/output cost per token) for models where pricing metadata is missing or incorrect — especially for self-hosted Ollama models, OpenRouter community models, and KiloCode free-tier models. This would give me accurate usage cost tracking in the Dashboard.

What prevents this today?

When a model's pricing is not provided by the provider API, the usage cost in the Dashboard shows $0.00 or "unknown". There is no UI or CLI command to manually set input/output token costs, so usage tracking is unreliable for mixed free/paid setups.

PR #3582 added pricing-policy resolution for usage tracking, but it works with provider-reported prices only — there is no manual override mechanism exposed in the GUI or CLI.

What should OpenCodex do?

  • In the model detail/edit view (or a new "Pricing" column in the model list), allow the user to manually set:
    • Input cost per 1M tokens
    • Output cost per 1M tokens
  • Manual overrides should take precedence over provider-reported prices in usage cost calculations.
  • Overrides should persist in the local configuration and survive catalog re-sync (ocx sync).
  • A visual indicator (e.g., pencil icon or "custom" badge) should show when a model has manually overridden pricing.
  • Provide a "Reset to auto" action to revert to provider-reported pricing.

Example usage or interface

Manual price override in model settings:

┌─────────────────────────────────────────────────┐
│  Model: ollama/my-custom-model                  │
│                                                 │
│  Pricing:  ○ Auto (from provider)               │
│            ● Manual override                    │
│                                                 │
│  Input:  [___0.50___] per 1M tokens             │
│  Output: [___1.50___] per 1M tokens             │
│                                                 │
│  [Save]  [Reset to auto]                        │
└─────────────────────────────────────────────────┘

CLI equivalent:

# Set custom pricing for a model
ocx model set-price ollama/my-model --input 0.50 --output 1.50

# Reset to auto-detected pricing
ocx model set-price ollama/my-model --auto

Alternatives or workarounds

No workaround exists — models with missing pricing always show $0.00 in usage, making cost tracking unreliable for mixed free/paid setups.

Additional context

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    catalogModel catalog, slugs, visibility, routed entriesenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions