Repository navigation
[merge 12-01] fix(models): Gemini 2.5 retires — gemini and flash follow the redirect #647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -270,8 +270,13 @@ export const MODEL_ALIASES: Record<string, string> = { | |
| "gemini-pro": "google/gemini-3.1-pro", | ||
| "gemini-3-pro": "google/gemini-3.1-pro", | ||
| "gemini-3.1-pro": "google/gemini-3.1-pro", | ||
| gemini: "google/gemini-2.5-pro", | ||
| flash: "google/gemini-2.5-flash", | ||
| // Google retired Gemini 2.5 on 2026-12-01 and the gateways redirect | ||
| // gemini-2.5-pro -> gemini-3.8-flash ($1.25/$10 -> $0.75/$3.75) and | ||
| // gemini-2.5-flash -> gemini-3.5-flash-lite (same $0.30/$2.50). The bare | ||
| // shorthands follow the redirect. `flash` loses image input with it: 3.5 | ||
| // Flash-Lite is text-only. Pin gemini-3.6-flash for a vision Flash. | ||
| gemini: "google/gemini-3.8-flash", | ||
| flash: "google/gemini-3.5-flash-lite", | ||
| "gemini-3.1-pro-preview": "google/gemini-3.1-pro", | ||
| "google/gemini-3.1-pro-preview": "google/gemini-3.1-pro", | ||
| "gemini-3.6-flash": "google/gemini-3.6-flash", | ||
|
|
@@ -1574,6 +1579,11 @@ export const BLOCKRUN_MODELS: BlockRunModel[] = [ | |
| reasoning: true, | ||
| vision: true, | ||
| toolCalling: true, | ||
| // RETIRED 2026-12-01 by Google. The gateways redirect it to | ||
| // gemini-3.8-flash ($0.75/$3.75) before pricing. Entry kept so explicit | ||
| // pins stay priced; off the picker. | ||
| deprecated: true, | ||
| fallbackModel: "google/gemini-3.8-flash", | ||
| }, | ||
| { | ||
| id: "google/gemini-2.5-flash", | ||
|
|
@@ -1585,6 +1595,11 @@ export const BLOCKRUN_MODELS: BlockRunModel[] = [ | |
| maxOutput: 65536, | ||
| vision: true, | ||
| toolCalling: true, | ||
| // RETIRED 2026-12-01 by Google. The gateways redirect it to | ||
| // gemini-3.5-flash-lite (same $0.30/$2.50, no image input) before pricing. | ||
| // Entry kept so explicit pins stay priced; off the picker. | ||
| deprecated: true, | ||
| fallbackModel: "google/gemini-3.5-flash-lite", | ||
|
Comment on lines
+1601
to
+1602
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove The entry redirects to Suggested fix
|
||
| }, | ||
| { | ||
| // vision LIVE-VERIFIED 2026-08-31: 3 of 3 proxy probes with a 64x64 solid-red | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Record Gemini 2.5 Pro pins at the successor's cost on the API-key rail.
When a caller pins
google/gemini-2.5-proand uses an API key, the gateway charges the successor rate of $0.75/$3.75 per million tokens. The logged cost and the unsigned-success session spend still use the retained $1.25/$10 entry for that pin. For 60,000 output tokens, the code records $0.60 where the gateway charges $0.225. Usage statistics then overstate spend, and amaxCostPerRuncap can be reached earlier than the real charges would reach it.Make the recorded cost for a redirected pin match the rate the gateway charges. Either the pin's price must match the successor, or the cost path must resolve the redirect before pricing. Wallet-rail calls already log the actual payment, so this change applies to the API-key rail.