-
Notifications
You must be signed in to change notification settings - Fork 0
feat(opencode): add grok 4.5 and default to it via x.ai subscription #2030
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,5 +13,7 @@ OPENCLAW_ANTHROPIC_API_KEY=sk-ant-api03-your-key-here | |||||
| OPENCLAW_GATEWAY_TOKEN=your-gateway-token-here | ||||||
| # OpenCode API key for OpenCode Go access via cliproxyapi | ||||||
| OPENCODE_API_KEY=your-opencode-api-key-here | ||||||
| # xAI API key for Grok access via x.ai subscription (used by opencode xai provider) | ||||||
|
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. P2: The comment says "via x.ai subscription" but Prompt for AI agents
Suggested change
|
||||||
| XAI_API_KEY=xai-your-key-here | ||||||
|
Comment on lines
+16
to
+17
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. The comment states that the |
||||||
| # Paperclip database URL | ||||||
| DATABASE_URL=postgres://user:password@host:5432/paperclip | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| { | ||||||
| "$schema": "https://opencode.ai/config.json", | ||||||
| "model": "cliproxyapi/glm-4.7", | ||||||
| "model": "xai/grok-4.5", | ||||||
|
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. Changing the default model to Prompt for Agent |
||||||
| "small_model": "cliproxyapi/glm-4.7", | ||||||
| "autoupdate": true, | ||||||
| "agent": { | ||||||
|
|
@@ -193,6 +193,17 @@ | |||||
| } | ||||||
| } | ||||||
| }, | ||||||
| "xai": { | ||||||
| "name": "xAI", | ||||||
| "options": { | ||||||
| "apiKey": "{env:XAI_API_KEY}" | ||||||
| }, | ||||||
| "models": { | ||||||
| "grok-4.5": { | ||||||
| "name": "Grok 4.5 (via xAI subscription)" | ||||||
|
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. P2: The display name "Grok 4.5 (via xAI subscription)" is misleading — Prompt for AI agents
Suggested change
|
||||||
| } | ||||||
|
Comment on lines
+202
to
+204
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. The display name says "via xAI subscription", but this provider block is configured to use |
||||||
| } | ||||||
| }, | ||||||
| "zai-coding-plan": { | ||||||
| "models": { | ||||||
| "glm-4.7": { | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| { | ||||||
| "$schema": "https://opencode.ai/config.json", | ||||||
| "model": "cliproxyapi/__GLM__", | ||||||
| "model": "xai/__GROK__", | ||||||
| "small_model": "cliproxyapi/__GLM__", | ||||||
|
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. Optional: the default |
||||||
| "autoupdate": true, | ||||||
| "agent": { | ||||||
|
|
@@ -193,6 +193,17 @@ | |||||
| } | ||||||
| } | ||||||
| }, | ||||||
| "xai": { | ||||||
| "name": "xAI", | ||||||
| "options": { | ||||||
| "apiKey": "{env:XAI_API_KEY}" | ||||||
|
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. The Prompt for Agent |
||||||
| }, | ||||||
| "models": { | ||||||
| "__GROK__": { | ||||||
| "name": "__GROK_PRETTY__ (via xAI subscription)" | ||||||
|
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. P2: Same issue as in the generated config: "via xAI subscription" is inaccurate for API-key-based access. This template propagates the misleading label. Should be "via xAI API" to match how Prompt for AI agents
Suggested change
|
||||||
| } | ||||||
|
Comment on lines
+202
to
+204
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. The display name in the template says "via xAI subscription", but this provider block is configured to use |
||||||
| } | ||||||
| }, | ||||||
| "zai-coding-plan": { | ||||||
| "models": { | ||||||
| "glm-4.7": { | ||||||
|
|
||||||
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.
Good documentation of the new API key. However, since
xai/grok-4.5is now the default model, consider adding additional context here explaining: (1) this key is required for the default configuration, (2) how to obtain it (link to x.ai subscription), and (3) what fallback model to use if unavailable. This will significantly improve developer onboarding and reduce setup friction.Prompt for Agent