Skip to content

Update OpenAi client to work with "openai-compatible" providers#1

Merged
dmaretskyi merged 1 commit intomainfrom
dm/openai-compatibility
Aug 1, 2025
Merged

Update OpenAi client to work with "openai-compatible" providers#1
dmaretskyi merged 1 commit intomainfrom
dm/openai-compatibility

Conversation

@dmaretskyi
Copy link
Copy Markdown
Collaborator

Several "openai-compatible" providers (Ollama, LMStudio) do not have completion_tokens_details field in the response. This PR handles that case where that field is missing and defaults token counts to 0.

@dmaretskyi dmaretskyi closed this Aug 1, 2025
@dmaretskyi dmaretskyi reopened this Aug 1, 2025
@dmaretskyi dmaretskyi merged commit 3911d28 into main Aug 1, 2025
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