opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Issue with sdk.chat function: Undefined Error

Open mradspieler opened this issue 1 month ago • 0 comments

Description

Hello,

I'm encountering an issue when trying to execute a function related to the sdk.chat. The error log indicates that sdk.chat is undefined. 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. start opencode
  7. ask opencode something
  8. tested also different models, always the same issue

Screenshot and/or share link

Image
Image

Operating System

macOS 15.2

Terminal

Wezterm and Ghostty with tmux

Thank you for your help!

mradspieler avatar Dec 02 '25 10:12 mradspieler