feat(opencode): add grok 4.5 and default to it via x.ai subscription

Merged
SH
4mo ago
+27-2

Summary

  • Add grok → grok-4.5 to models.json
  • Set opencode default model to xai/grok-4.5 (small_model stays on GLM-4.7)
  • Add xai provider block to opencode config, authed via XAI_API_KEY (x.ai subscription)
  • Document XAI_API_KEY in .env.example

Generated config/opencode/opencode.jsonc was regenerated from the template via scripts/llm-update.sh.

Test plan

  • jq empty models.json passes
  • scripts/llm-update.sh regenerates opencode.jsonc with xai/grok-4.5 as default and the xai provider block
  • Set XAI_API_KEY in .env and confirm opencode connects to Grok

🤖 Generated with Claude Code


Summary by cubic

Defaulted OpenCode to xai/grok-4.5 via the x.ai subscription and added an xai provider. small_model stays on cliproxyapi/glm-4.7.

  • New Features

    • Added grok → grok-4.5 in models.json.
    • Set default model to xai/grok-4.5 in config/opencode/opencode.jsonc and config/opencode/opencode.tpl.jsonc.
    • Added xai provider with XAI_API_KEY auth; documented in .env.example.
  • Migration

    • Set XAI_API_KEY in your .env to enable Grok via x.ai.
    • If using the template, run scripts/llm-update.sh to regenerate config.