-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: replace grok with grok-4-fast-non-reasoning #301
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ export function getModel() { | |
| }) | ||
| // Optionally, add a check for credit status or skip xAI if credits are exhausted | ||
| try { | ||
| return xai('grok-3-fast-beta') | ||
| return xai('grok-4-fast-non-reasoning') | ||
|
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. Switching to a non-reasoning variant may change output quality/behavior (e.g., reasoning depth, tool-use capabilities, or structured output behavior). If the intent is performance/cost, consider a graceful in-provider fallback to the previous model before falling back to OpenAI to avoid surprising cross-provider differences when the new model is unavailable. SuggestionAdd a secondary fallback to the previous xAI model before dropping to OpenAI: try {
return xai('grok-4-fast-non-reasoning')
} catch {
try {
return xai(process.env.XAI_FALLBACK_MODEL ?? 'grok-3-fast-beta')
} catch {
console.warn('xAI models unavailable, falling back to OpenAI:')
}
}Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this change. |
||
| } catch (error) { | ||
| console.warn('xAI API unavailable, falling back to OpenAI:') | ||
| } | ||
|
|
||
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.
Hard-coding the model ID makes future updates brittle and requires code changes to switch models. Consider making the model configurable (e.g., via an environment variable) and defaulting to
grok-4-fast-non-reasoning. This improves maintainability and eases rollback if needed.Suggestion
You could parameterize the model ID and provide a sensible default:
Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this change.