Skip to content

Conversation

@ZakWork
Copy link

@ZakWork ZakWork commented Nov 13, 2025

This is causing the Kimi CLI to break when using the Anthropic API as when the input is calculated the following error occurs

self = TokenUsage(input_other=None, output=0, input_cache_read=0, input_cache_creation=0) TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

https://github.com/MoonshotAI/kosong/blob/4c25822441fda91bea52dbd10f16365883996ea8/src/kosong/chat_provider/__init__.py#L93C17-L93C18

Related to issue MoonshotAI/kimi-cli#264

This is causing the Kimi CLI to break when using the Anthropic API as when the input is calculated the following error occurs

self = TokenUsage(input_other=None, output=0, input_cache_read=0, input_cache_creation=0) 
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'


https://github.com/MoonshotAI/kosong/blob/4c25822441fda91bea52dbd10f16365883996ea8/src/kosong/chat_provider/__init__.py#L93C17-L93C18


Signed-off-by: Zakrea <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant