Expand description
OpenAI-compatible chat-completions client. The endpoint and key come only from config.
Structs§
- Model
Limits - Per-model limits only: a model with its own context size or reply cap.
- Open
AiProvider - Provider
Profile - How a request is shaped for one backend dialect. Everything here is wire detail: the conversation, the tools and the prompt never depend on it.
- Request
Options - The optional knobs
[provider]exposes: what we want sent. The wire profile is the other half — how this backend spells it, and whether it understands the field at all. - Request
Policy - The standing request policy a profile declares: the knobs that depend on the model and the endpoint rather than on one turn.
Enums§
- Model
Reasoning - What a model says about its own reasoning, in a manifest.
- Reasoning
- What a model’s reasoning control is, once the profile and its per-model entries are consulted.
- Temperature
- What a profile says to do with
temperature.
Traits§
Functions§
- advertised_
context_ window - Read the context window the endpoint advertises for one model, in one of the dialects
it may speak. Returns
Noneon any failure and never fabricates a number: callers fall back to their own budget, then to “no budget”. - list_
models - Which models an OpenAI-compatible server says it serves:
GET {base_url}/models. - parse_
response - Extract the first choice’s message from a chat-completions response body.