Skip to content

Command: opencode agent create fails #7322

Closed

Description

@Cirius1792

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

Activity

  1. github-actions commented on Jan 8, 2026

    @github-actions
    Contributor

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

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

  2. cravenceiling commented on Jan 9, 2026

    @cravenceiling
    Contributor

    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.

  3. Cirius1792 commented on Jan 9, 2026

    @Cirius1792
    Author

    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"],
    }
  4. goniz commented on Jan 9, 2026

    @goniz
    Contributor

    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)

  5. Cirius1792 commented on Jan 9, 2026

    @Cirius1792
    Author

    @goniz Yes I have an Azure provider configured indeed, but why this should be a problem and what are you suggesting to solve it?

  6. goniz commented on Jan 9, 2026

    @goniz
    Contributor

    @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

  7. radumg commented on Jan 13, 2026

    @radumg

    +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

  8. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions