OpenAI compatibility returning wrong variable names for 'usage'

The variable names in the usage object returned by the Gemini API using OpenAI compatibility mode are named in camelCase instead of snake_case.

CompletionUsage(
    completion_tokens=None,
    prompt_tokens=None,
    total_tokens=None,
    completion_tokens_details=None,
    prompt_tokens_details=None,
    completionTokens=33,
    promptTokens=19,
    totalTokens=52,
)
1 Like

Hi @Sierra , Welcome to the forum.

The issue mentioned above has been escalated.

Thanks.

1 Like

Also the “finishReason” field under “choices” should be snake case, like “finish_reason”

1 Like