Skip to content

Represent Pollinations' distinct reasoning and modality pricing #863

Backlog

Description

@mdev34-lab

Follow-up from PR #861.

Problem

packages/opencode/src/provider/pollinations.ts currently maps only promptTextTokens, completionTextTokens, promptCachedTokens, and promptCacheWriteTokens into SilverCode's flat Model.cost fields.

Pollinations exposes additional billing categories, including reasoning-token and image/audio/video input prices. For models where those rates differ from text-token rates, SilverCode's estimated/recorded costs can be inaccurate because it applies the flat text rates to all usage.

Expected behavior

  • Inventory the pricing categories actually present in Pollinations' live /v1/models catalog and their billing semantics.
  • Decide how to represent categories that SilverCode's current flat Model.cost schema cannot express.
  • Avoid presenting text-only rates as exact total pricing for models with distinct token-category rates.
  • Add fixtures/tests for a model with a different reasoning-token rate and for any supported modality-specific rates.
  • Document any remaining approximation explicitly.

Parent context

Tracked as a follow-up to PR #861; intentionally deferred so cost-schema work can be handled separately from the provider integration.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions