opencode
opencode copied to clipboard
Issue with sdk.chat function: Undefined Error
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
- remove all relevant directories
- rm -rf .cache/opencode
- rm -rf .config/opencode
- rm -rf .local/share/opencode
- rm -rf .opencode
- start opencode
- ask opencode something
- tested also different models, always the same issue
Screenshot and/or share link
Operating System
macOS 15.2
Terminal
Wezterm and Ghostty with tmux
Thank you for your help!