fix(agents): rename xai provider key to xai-oc to avoid opencode catalog collision #119

Merged
ffaerber merged 1 commits from hotfix/xai-provider-name-collision into main 2026-07-30 13:08:39 +02:00
Owner

Fixes #118.

Every @lead/@ops run has been crashing (Z.responses is not a function) since the xAI migration. Root cause: opencode has a built-in xai provider in its own model catalog, and our custom OpenAI-compatible shim was also named xai — the collision makes opencode's --auto permission-check path call .responses() on the wrong provider object once a permission block exists (always, here).

Reproduced locally with the exact production opencode.json shape on opencode 1.17.13: 100% failure with provider key xai, 100% success after renaming to xai-oc. This PR renames the provider key + model ids (xai/grok-4.5xai-oc/grok-4.5) throughout install-opencode.sh, agents.json, and README.md.

Fixes #118. Every `@lead`/`@ops` run has been crashing (`Z.responses is not a function`) since the xAI migration. Root cause: opencode has a *built-in* `xai` provider in its own model catalog, and our custom OpenAI-compatible shim was also named `xai` — the collision makes opencode's `--auto` permission-check path call `.responses()` on the wrong provider object once a `permission` block exists (always, here). Reproduced locally with the exact production `opencode.json` shape on opencode 1.17.13: 100% failure with provider key `xai`, 100% success after renaming to `xai-oc`. This PR renames the provider key + model ids (`xai/grok-4.5` → `xai-oc/grok-4.5`) throughout `install-opencode.sh`, `agents.json`, and `README.md`.
ffaerber added 1 commit 2026-07-30 13:08:31 +02:00
opencode ships a built-in `xai` model-catalog entry (a real @ai-sdk/xai
integration with Responses-API support). Naming our custom OpenAI-compatible
shim `xai` too made opencode's --auto permission-check path assume the
catalog's provider object once a `permission` block is present (always, in
this pipeline) and call .responses(), which our shim doesn't implement —
crashing every @lead/@ops run with "Z.responses is not a function".

Reproduced locally with the production config shape on opencode 1.17.13;
renaming the provider key to xai-oc (model id xai-oc/grok-4.5) fixes it
reliably across repeated fresh-state runs.
ffaerber merged commit e040247097 into main 2026-07-30 13:08:39 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#119