mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-06 22:06:03 +00:00
refactor(provider): simplify LiteLLM requester usage handling
- Remove unused Anthropic-specific tool schema generation - Share completion argument construction between normal and streaming calls - Use LiteLLM/OpenAI native usage fields for monitoring - Collect stream token usage from LiteLLM stream_options - Update LiteLLM requester tests for unified usage fields
This commit is contained in:
@@ -93,8 +93,6 @@ class TestExtractUsage:
|
||||
assert result['prompt_tokens'] == 100
|
||||
assert result['completion_tokens'] == 50
|
||||
assert result['total_tokens'] == 150
|
||||
assert result['input_tokens'] == 100 # Compatibility alias
|
||||
assert result['output_tokens'] == 50 # Compatibility alias
|
||||
|
||||
def test_extract_usage_with_zero_values(self):
|
||||
"""Test extraction when values are 0"""
|
||||
|
||||
Reference in New Issue
Block a user