Skip to content

Issue with sdk.chat function: Undefined Error #4977

@mradspieler

Description

@mradspieler

Description

Hello,

I'm encountering an issue when trying to execute opencode. The error log indicates that sdk.chat is undefined. After a successful auth login into github-enterprise I start opencode and ask something. Here are the details:

Error Log:

ERROR 2025-12-02T10:07:17 +21ms service=default e=sdk.chat is not a function. (In 'sdk.chat(modelID)', 'sdk.chat' is undefined) rejection

OpenCode version

1.0.126

Steps to reproduce

  1. remove all relevant directories
  2. rm -rf .cache/opencode
  3. rm -rf .config/opencode
  4. rm -rf .local/share/opencode
  5. rm -rf .opencode
  6. opencode auth login
  7. successful login in an gitHub-enterprise account xxx.ghe.com
  8. start opencode and ask something
  9. tested also different models, always the same issue

Screenshot and/or share link

Image
Image

Operating System

macOS 15.2

Terminal

Wezterm or Ghostty with tmux

Thank you for your help!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions