Expand description
OpenAI model capability and endpoint routing helpers.
Gestura supports both the legacy Chat Completions endpoint and the modern Responses endpoint for OpenAI. This module centralizes the model-id heuristics that determine whether a model is suitable for agent sessions and which endpoint should be used.
Enums§
- Open
AiApi - OpenAI inference API selected for a given model.
Functions§
- is_
agent_ capable_ openai_ model - Returns
truewhen the model is suitable for Gestura agent sessions. - is_
known_ openai_ legacy_ completion_ model - Returns
truewhen the model id is a known legacy completion / non-agent model. - is_
openai_ model_ incompatible_ with_ agent_ session - Returns
truewhen the model should be rejected for agent sessions. - is_
openai_ responses_ api_ model - Returns
truewhen a model should be routed to/v1/responses. - looks_
like_ openai_ model - Returns
truewhen the model id is obviously part of the OpenAI family. - openai_
agent_ session_ model_ message - Build a user-facing error describing why the model cannot be used for sessions.
- openai_
api_ for_ model - Select the OpenAI inference API to use for the supplied model id.