Module openai_compat

Module openai_compat 

Source
Expand description

OpenAI(-compatible) API compatibility helpers (e.g., parameter support quirks). OpenAI API compatibility helpers.

Some OpenAI(-compatible) models reject non-default parameters. We defensively detect those errors and allow higher layers to retry with a reduced request body.

Functionsยง

should_retry_without_temperature
Returns true if an OpenAI(-compatible) error response indicates the temperature parameter is unsupported and callers should retry without it.