Command: opencode agent create fails #4433

Open
opened 2026-02-16 17:43:46 -05:00 by yindo · 7 comments
Owner

Originally created by @Cirius1792 on GitHub (Jan 8, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Image

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) fatal

Plugins

No response

OpenCode version

1.1.6

Steps to reproduce

  1. launch opencode agent create
  2. insert the agent description

Screenshot and/or share link

Image

Operating System

ubuntu in wsl

Terminal

Wezterm

Originally created by @Cirius1792 on GitHub (Jan 8, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description <img width="2044" height="329" alt="Image" src="https://github.com/user-attachments/assets/e0fc242d-6f0c-4210-837d-76731decdf00" /> 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)" ```bash $ 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) fatal ``` ### Plugins _No response_ ### OpenCode version 1.1.6 ### Steps to reproduce 1. launch opencode agent create 2. insert the agent description ### Screenshot and/or share link <img width="2044" height="329" alt="Image" src="https://github.com/user-attachments/assets/c5466520-30f3-4d56-9356-3ef3c3424c9f" /> ### Operating System ubuntu in wsl ### Terminal Wezterm
yindo added the windowsbug labels 2026-02-16 17:43:46 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #3956: Agent creation flow is failing (similar LLM generation error: "No object generated: response did not match schema")
  • #5566: Error when trying to create new agent ("The requested model is not supported" error)
  • #5973: Unsupported model version errors during agent creation (closed)

Feel free to ignore if your specific case with the sdk.responses is not a function error is distinct from these.

@github-actions[bot] commented on GitHub (Jan 8, 2026): This issue might be a duplicate of existing issues. Please check: - #3956: Agent creation flow is failing (similar LLM generation error: "No object generated: response did not match schema") - #5566: Error when trying to create new agent ("The requested model is not supported" error) - #5973: Unsupported model version errors during agent creation (closed) Feel free to ignore if your specific case with the `sdk.responses is not a function` error is distinct from these.
Author
Owner

@cravenceiling commented on GitHub (Jan 8, 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.

@cravenceiling commented on GitHub (Jan 8, 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.
Author
Owner

@Cirius1792 commented on GitHub (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"],
}
@Cirius1792 commented on GitHub (Jan 9, 2026): Do you mean my opencode.json file? ```json { "$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"], } ```
Author
Owner

@goniz commented on GitHub (Jan 9, 2026):

You seem to have some providers configured according to your log

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

Use opencode auth and ~/.local/share/opencode/auth.json to manage them.

(I suspect you have an env variable for Azure api key that's getting picked up by OpenCode)

@goniz commented on GitHub (Jan 9, 2026): You seem to have some providers configured according to your log ``` 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 ``` Use `opencode auth` and `~/.local/share/opencode/auth.json` to manage them. (I suspect you have an env variable for Azure api key that's getting picked up by OpenCode)
Author
Owner

@Cirius1792 commented on GitHub (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?

@Cirius1792 commented on GitHub (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?
Author
Owner

@goniz commented on GitHub (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?

I would start by updating opencode to the latest version.

Next I would try to run the agent create command using --model flag and selecting a non-azure model to see if that helps

Like opencode agent create --model opencode/big-pickle

@goniz commented on GitHub (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? I would start by updating opencode to the latest version. Next I would try to run the agent create command using `--model` flag and selecting a non-azure model to see if that helps Like `opencode agent create --model opencode/big-pickle`
Author
Owner

@radumg commented on GitHub (Jan 13, 2026):

+1 for having this issue with opencode 1.1.17 in 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

Like opencode agent create --model opencode/big-pickle

@radumg commented on GitHub (Jan 13, 2026): +1 for having this issue with opencode `1.1.17` in both CLI and Desktop while using an Azure provider. Here's my opencode config as it was requested above. ```json { "$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 > Like `opencode agent create --model opencode/big-pickle`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4433