Skip to content

fix: show standard prices in provider model listings - #5893

Open
chrarnoldus wants to merge 1 commit into
mainfrom
fix/standard-provider-model-pricing
Open

fix: show standard prices in provider model listings#5893
chrarnoldus wants to merge 1 commit into
mainfrom
fix/standard-provider-model-pricing

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • Preserve frontend endpoint variant metadata and exclude batch cards before provider snapshots are deduplicated.
  • Keep standard pricing independent of card order while preserving free variants and older metadata shapes.
  • Add regression coverage at the upstream fetch/parse boundary, including GPT-5.6 Sol prices.

Root cause

The Providers & Models screen reads the synced frontend provider cards, not the public model endpoints directly. OpenRouter currently returns a standard GPT-5.6 Sol card followed by a batch card with the same base model slug. Variant metadata was stripped, so last-write-wins deduplication replaced standard prices with batch prices (which match the flex prices in the linked public endpoints response). This also affected other standard/batch pairs.

The fix leaves discount reversal and public endpoint routing unchanged. The corrected screen prices appear after the next successful provider metadata sync.

Reference: https://openrouter.ai/api/v1/models/openai/gpt-5.6-sol/endpoints

Verification

  • Passed formatting and focused oxlint on all four changed files.
  • Passed pnpm --filter @kilocode/db typecheck.
  • pnpm --filter web typecheck could not complete: the two-minute sandbox limit terminated the prerequisite tRPC build. Local Node is 22 rather than the required 24.
  • Tests intentionally deferred to CI as requested.
  • Focused independent code review: no findings.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Sep 4, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • apps/web/src/lib/ai-gateway/providers/openrouter/fetch-provider-models.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/fetch-provider-models.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/sync-providers.ts
  • packages/db/src/schema-types.ts

Reviewed by grok-4.6 · Input: 59.1K · Output: 13.6K · Cached: 428.3K

Review guidance: REVIEW.md from base branch main

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant