opencode
opencode copied to clipboard
custom @ai-sdk/anthropic provider , context token usage display error
Description
{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":236,"output_tokens":81,"cache_read_input_tokens":12800}}
"provider": {
"local": {
"npm": "@ai-sdk/anthropic",
"name": "My Local",
"options": {
"baseURL": "http://localhost:4141/v1",
"apiKey": "dummy"
},
"models": {
"gpt-5.2": {
"name": "gpt-5.2",
"limit": {
"context": 200000,
"output": 64000
}
},
"gpt-5-mini": {
"name": "gpt-5-mini",
"limit": {
"context": 200000,
"output": 64000
}
},
"claude-sonnet-4.5": {
"id": "claude-sonnet-4.5",
"name": "claude-sonnet-4.5",
"limit": {
"context": 200000,
"output": 16000
},
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 16000
}
}
}
}
}
}
Plugins
No response
OpenCode version
1.1.8
Steps to reproduce
- ask hi
- see context info
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
pwsh