Skip to content

Issue with sdk.chat function: Undefined Error #4977

Closed

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!

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 2, 2025
  2. self-assigned this
    on Dec 2, 2025
  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 2, 2025
  4. rekram1-node commented on Dec 2, 2025

    @rekram1-node
    Collaborator

    hmm I must have broken something, I will take a look

  5. rekram1-node commented on Dec 2, 2025

    @rekram1-node
    Collaborator

    in meantime you can downgrade to something pre 1.0.115ish ill fix this today

  6. rekram1-node commented on Dec 3, 2025

    @rekram1-node
    Collaborator

    fixed in next release: b457923

  7. added a commit that references this issue on Dec 29, 2025
    b7214e4
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 working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions