-
Notifications
You must be signed in to change notification settings - Fork 190
feat(models): add GPT-5 series, Gemini, and Deepseek models with Routeway discount #925
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
d7d8c30
ebbafac
a323b96
cf2bf6e
b1b23ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,19 @@ export const googleModels = [ | |
| vision: true, | ||
| tools: true, | ||
| }, | ||
| { | ||
| providerId: "routeway-discount", | ||
| modelName: "gemini-2.5-pro", | ||
| inputPrice: 1.25 / 1e6, | ||
| outputPrice: 10.0 / 1e6, | ||
| discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"), | ||
|
Contributor
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. Fix discount fallback: respect "0" values. Same issue as above: replace Apply: - discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"),
+ discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT ?? "1"),Also applies to: 150-150, 186-186 🤖 Prompt for AI Agents |
||
| requestPrice: 0, | ||
| contextSize: 1000000, | ||
| maxOutput: undefined, | ||
| streaming: true, | ||
| vision: true, | ||
| tools: true, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
|
|
@@ -128,6 +141,20 @@ export const googleModels = [ | |
| vision: true, | ||
| tools: true, | ||
| }, | ||
| { | ||
| providerId: "routeway-discount", | ||
| modelName: "gemini-2.5-flash", | ||
| inputPrice: 0.3 / 1e6, | ||
| outputPrice: 2.5 / 1e6, | ||
| cachedInputPrice: 0.075 / 1e6, | ||
| discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"), | ||
| requestPrice: 0, | ||
| contextSize: 1000000, | ||
| maxOutput: undefined, | ||
| streaming: true, | ||
| vision: true, | ||
| tools: true, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
|
|
@@ -150,6 +177,20 @@ export const googleModels = [ | |
| vision: true, | ||
| tools: true, | ||
| }, | ||
| { | ||
| providerId: "routeway-discount", | ||
| modelName: "gemini-2.5-flash-lite", | ||
| inputPrice: 0.1 / 1e6, | ||
| outputPrice: 0.4 / 1e6, | ||
| cachedInputPrice: 0.025 / 1e6, | ||
| discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"), | ||
| requestPrice: 0, | ||
| contextSize: 1000000, | ||
| maxOutput: undefined, | ||
| streaming: true, | ||
| vision: true, | ||
| tools: true, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -364,6 +364,31 @@ export const openaiModels = [ | |||||
| "tool_choice", | ||||||
| ], | ||||||
| }, | ||||||
| { | ||||||
| providerId: "routeway-discount", | ||||||
| modelName: "gpt-5", | ||||||
| inputPrice: 1.25 / 1e6, | ||||||
| outputPrice: 10.0 / 1e6, | ||||||
| cachedInputPrice: 0.125 / 1e6, | ||||||
| discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"), | ||||||
|
Contributor
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. 🧩 Analysis chainUse nullish coalescing for ROUTEWAY_PAID_DISCOUNT (avoid breaking on "0").
Apply: - discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"),
+ discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT ?? "1"),Run to find other occurrences project-wide: Also applies to: 430-430, 487-487 🏁 Script executed: #!/bin/bash
rg -nP 'ROUTEWAY_PAID_DISCOUNT\s*\|\|\s*["'\'']1["'\'']' -C2Length of output: 5073 Replace
Files/locations:
Apply: - discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"),
+ discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT ?? "1"),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| requestPrice: 0, | ||||||
| contextSize: 400000, | ||||||
| maxOutput: 128000, | ||||||
| reasoning: true, | ||||||
| reasoningOutput: "omit", | ||||||
| streaming: true, | ||||||
| vision: true, | ||||||
| tools: true, | ||||||
| supportedParameters: [ | ||||||
| "temperature", | ||||||
| "top_p", | ||||||
| "frequency_penalty", | ||||||
| "presence_penalty", | ||||||
| "response_format", | ||||||
| "tools", | ||||||
| "tool_choice", | ||||||
| ], | ||||||
| }, | ||||||
| ], | ||||||
| jsonOutput: true, | ||||||
| }, | ||||||
|
|
@@ -397,6 +422,31 @@ export const openaiModels = [ | |||||
| "tool_choice", | ||||||
| ], | ||||||
| }, | ||||||
| { | ||||||
| providerId: "routeway-discount", | ||||||
| modelName: "gpt-5-mini", | ||||||
| inputPrice: 0.25 / 1e6, | ||||||
| outputPrice: 2 / 1e6, | ||||||
| cachedInputPrice: 0.025 / 1e6, | ||||||
| discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"), | ||||||
| requestPrice: 0, | ||||||
| contextSize: 400000, | ||||||
| maxOutput: 128000, | ||||||
| reasoning: true, | ||||||
| reasoningOutput: "omit", | ||||||
| streaming: true, | ||||||
| vision: true, | ||||||
| tools: true, | ||||||
| supportedParameters: [ | ||||||
| "temperature", | ||||||
| "top_p", | ||||||
| "frequency_penalty", | ||||||
| "presence_penalty", | ||||||
| "response_format", | ||||||
| "tools", | ||||||
| "tool_choice", | ||||||
| ], | ||||||
| }, | ||||||
| ], | ||||||
| jsonOutput: true, | ||||||
| }, | ||||||
|
|
@@ -430,6 +480,31 @@ export const openaiModels = [ | |||||
| "tool_choice", | ||||||
| ], | ||||||
| }, | ||||||
| { | ||||||
| providerId: "routeway-discount", | ||||||
| modelName: "gpt-5-nano", | ||||||
| inputPrice: 0.05 / 1e6, | ||||||
| outputPrice: 0.4 / 1e6, | ||||||
| cachedInputPrice: 0.005 / 1e6, | ||||||
| discount: parseFloat(process.env.ROUTEWAY_PAID_DISCOUNT || "1"), | ||||||
| requestPrice: 0, | ||||||
| contextSize: 400000, | ||||||
| maxOutput: 128000, | ||||||
| reasoning: true, | ||||||
| reasoningOutput: "omit", | ||||||
| streaming: true, | ||||||
| vision: false, | ||||||
| tools: true, | ||||||
| supportedParameters: [ | ||||||
| "temperature", | ||||||
| "top_p", | ||||||
| "frequency_penalty", | ||||||
| "presence_penalty", | ||||||
| "response_format", | ||||||
| "tools", | ||||||
| "tool_choice", | ||||||
| ], | ||||||
| }, | ||||||
| ], | ||||||
| jsonOutput: true, | ||||||
| }, | ||||||
|
|
||||||
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.
Fix discount fallback: use ?? not ||.
Ensure
"0"is not coerced to default.Apply:
Also applies to: 170-170
🤖 Prompt for AI Agents