Repository navigation
Command: opencode agent create fails #7322
Copy link
Copy link
Closed
Labels
Description
Description
The command opencode agent create fails after inserting the description with the error:
"LLM failed to generate agent: sdk.responses is not a function. (In 'sdk.responses(modelID)', 'sdk.responses' is undefined)"
$ opencode agent create --print-logs
INFO 2026-01-08T11:50:25 +207ms service=default version=1.1.6 args=["agent","create","--print-logs"] opencode
INFO 2026-01-08T11:50:25 +0ms service=default directory=/home/clt/Projects/Allitude/customer-position/customer-position-web creating instance
INFO 2026-01-08T11:50:25 +0ms service=project directory=/home/clt/Projects/Allitude/customer-position/customer-position-web fromDirectory
┌ Create agent
│
◇ Location
│ Global
│
◇ Description
│ Senior Java architect specializing in enterprise-grade applications, Spring ecosystem, and cloud-native development. Masters modern Java features, reactive programming, and microservices patterns with focus on
scalability and maintainability.
│
INFO 2026-01-08T11:50:38 +13084ms service=config path=/home/clt/.config/opencode/config.json loading
INFO 2026-01-08T11:50:38 +1ms service=config path=/home/clt/.config/opencode/opencode.json loading
INFO 2026-01-08T11:50:38 +0ms service=config path=/home/clt/.config/opencode/opencode.jsonc loading
INFO 2026-01-08T11:50:38 +3ms service=bun cmd=["/home/clt/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.6","--exact"] cwd=/home/clt/.config/opencode running
INFO 2026-01-08T11:50:38 +5ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)
installed @opencode-ai/plugin@1.1.6
[1.00ms] done
stderr=Saved lockfile
done
INFO 2026-01-08T11:50:38 +0ms service=bun cmd=["/home/clt/.opencode/bin/opencode","install"] cwd=/home/clt/.config/opencode running
INFO 2026-01-08T11:50:38 +1ms service=config path=/home/clt/.opencode/opencode.jsonc loading
INFO 2026-01-08T11:50:38 +1ms service=config path=/home/clt/.opencode/opencode.json loading
INFO 2026-01-08T11:50:38 +5ms service=bun cmd=["/home/clt/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.6","--exact"] cwd=/home/clt/.opencode running
INFO 2026-01-08T11:50:38 +2ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)
Checked 3 installs across 4 packages (no changes) [1.00ms]
stderr= done
INFO 2026-01-08T11:50:38 +5ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)
installed @opencode-ai/plugin@1.1.6
[2.00ms] done
stderr=Saved lockfile
done
INFO 2026-01-08T11:50:38 +1ms service=bun cmd=["/home/clt/.opencode/bin/opencode","install"] cwd=/home/clt/.opencode running
INFO 2026-01-08T11:50:38 +4ms service=provider status=started state
INFO 2026-01-08T11:50:38 +2ms service=models.dev file={} refreshing
INFO 2026-01-08T11:50:38 +1ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)
Checked 3 installs across 4 packages (no changes) [1.00ms]
stderr= done
INFO 2026-01-08T11:50:38 +9ms service=provider init
INFO 2026-01-08T11:50:38 +4ms service=plugin path=opencode-copilot-auth@0.0.9 loading plugin
INFO 2026-01-08T11:50:38 +2ms service=plugin path=opencode-anthropic-auth@0.0.5 loading plugin
INFO 2026-01-08T11:50:38 +20ms service=provider providerID=azure found
INFO 2026-01-08T11:50:38 +0ms service=provider providerID=openai found
INFO 2026-01-08T11:50:38 +0ms service=provider providerID=opencode found
INFO 2026-01-08T11:50:38 +0ms service=provider status=completed duration=38 state
INFO 2026-01-08T11:50:38 +2ms service=provider status=started providerID=azure getSDK
INFO 2026-01-08T11:50:38 +0ms service=provider providerID=azure pkg=@ai-sdk/anthropic using bundled provider
INFO 2026-01-08T11:50:38 +0ms service=provider status=completed duration=0 providerID=azure getSDK
■ LLM failed to generate agent: sdk.responses is not a function. (In 'sdk.responses(modelID)', 'sdk.responses' is undefined)
ERROR 2026-01-08T11:50:38 +5ms service=default name=UICancelledError message=UICancelledError stack=UICancelledError: UICancelledError
at <anonymous> (src/cli/cmd/agent.ts:127:17)
at processTicksAndRejections (native:7:39) fatalPlugins
No response
OpenCode version
1.1.6
Steps to reproduce
- launch opencode agent create
- insert the agent description
Screenshot and/or share link
Operating System
ubuntu in wsl
Terminal
Wezterm
Reactions are currently unavailable
Activity
github-actions commentedon Jan 8, 2026
This issue might be a duplicate of existing issues. Please check:
opencode agent createUnsupported model version v3 for provider "mistral.chat" #5973: Unsupported model version errors during agent creation (closed)Feel free to ignore if your specific case with the
sdk.responses is not a functionerror is distinct from these.cravenceiling commentedon Jan 9, 2026
Could you share your config? please. It seems to be the provider, you can also try with a different provider.
I wasn't able to reproduce the error btw.
Cirius1792 commentedon Jan 9, 2026
Do you mean my opencode.json file?
{ "$schema": "https://opencode.ai/config.json", "mcp": { "serena": { "type": "local", "enabled": true, "command": ["uvx","--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "ide-assistant"], }, "context7": { "type": "local", "command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "XXXX"], "enabled": true } }, "tools": { "serena": true, "context7": true }, "plugin": ["@tarquinen/opencode-dcp@latest"], }goniz commentedon Jan 9, 2026
You seem to have some providers configured according to your log
Use
opencode authand~/.local/share/opencode/auth.jsonto manage them.(I suspect you have an env variable for Azure api key that's getting picked up by OpenCode)
Cirius1792 commentedon Jan 9, 2026
@goniz Yes I have an Azure provider configured indeed, but why this should be a problem and what are you suggesting to solve it?
goniz commentedon Jan 9, 2026
I would start by updating opencode to the latest version.
Next I would try to run the agent create command using
--modelflag and selecting a non-azure model to see if that helpsLike
opencode agent create --model opencode/big-pickleradumg commentedon Jan 13, 2026
+1 for having this issue with opencode
1.1.17in both CLI and Desktop while using an Azure provider.Here's my opencode config as it was requested above.
{ "$schema": "https://opencode.ai/config.json", "share": "disabled", "autoupdate": true, "provider": { "azure-cognitive-services": { "models": { "devteam-gpt-5.1-codex": { "name": "devteam-gpt-5.1-codex", "options": { "store": true } } } } } }Can also confirm the following command does work
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.