Skip to content

fix(ai-gateway): disable GPT-5.6 promotion - #4910

Merged
chrarnoldus merged 2 commits into
mainfrom
flannel-narcissus
Jul 31, 2026
Merged

fix(ai-gateway): disable GPT-5.6 promotion#4910
chrarnoldus merged 2 commits into
mainfrom
flannel-narcissus

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • disable the OpenRouter GPT-5.6 promotion
  • prefer the openai inference provider for OpenAI GPT models independently of the promo flag
  • update promo and provider-routing expectations for the disabled state

Testing

  • not run locally; CI will validate the change

@chrarnoldus chrarnoldus self-assigned this Jul 31, 2026
@chrarnoldus
chrarnoldus enabled auto-merge (squash) July 31, 2026 08:45
@kilo-code-bot

kilo-code-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Flag flip to disable the GPT-5.6 promotion plus a widening of the preferred inference provider to all OpenAI models; verified the flag's three consumers (display-pricing.ts:26, openrouter/index.ts:90, vercel/index.ts:98) and the updated pricing/name expectations are arithmetically and behaviorally consistent, with high confidence.

Notes and assumptions (no action required):

  • getPreferredProviderOrder now returns ['openai'] for every model matching isOpenAiModel (any id containing openai/gpt, excluding GPT-OSS), not just the four promo ids. This is stated as intentional in the PR description. It also changes catalog pricing selection in openrouter/index.ts:139-149, where the preferred-endpoint lookup has no endpoints[0] fallback; this matches the existing behavior for Claude/DeepSeek/GLM/etc., so it is not flagged. order is a preference (fallbacks still allowed) and only/ignore are untouched, so Vercel routing eligibility is unaffected, and openai maps to a valid Vercel provider slug.
  • Kilo-exclusive stealth/gpt-5.6-sol also matches isOpenAiModel, but it is served through the martian gateway, so applyPreferredProvider (openrouter/vercel only) and the OpenRouter catalog mapping do not apply to it.
  • With the flag off, the shouldRouteToVercel promo guard becomes unreachable and its only test was deleted rather than inverted; acceptable for a toggle, but the guard is now uncovered.
  • Test expectations verified by hand: undoPricingDiscount at discount: 0.5 yields the asserted 0.000002000000/0.000008000000/0.000000200000, and prompt: '0.00001' hits the ($$$$) threshold in formatName, so the ($$$$) expectations are correct. Removed imports (jest, OPENROUTER_GPT56_PROMO_MODEL_IDS) are no longer referenced, and GatewayRequest is still used in vercel/index.test.ts.
  • Tests were not executed (read-only review mode); CI should confirm.
Files Reviewed (6 files)
  • apps/web/src/lib/ai-gateway/providers/openai.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/display-pricing.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.test.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts

Reviewed by claude-opus-5 · Input: 70 · Output: 23.1K · Cached: 2.1M

Review guidance: REVIEW.md from base branch main

@chrarnoldus
chrarnoldus merged commit 4ac10a7 into main Jul 31, 2026
16 checks passed
@chrarnoldus
chrarnoldus deleted the flannel-narcissus branch July 31, 2026 08:55
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.

2 participants