Skip to main content

Module provider

Module provider 

Source
Expand description

OpenAI-compatible chat-completions client. The endpoint and key come only from config.

Structs§

ModelLimits
Per-model limits only: a model with its own context size or reply cap.
OpenAiProvider
ProviderProfile
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.
RequestOptions
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.
RequestPolicy
The standing request policy a profile declares: the knobs that depend on the model and the endpoint rather than on one turn.

Enums§

ModelReasoning
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§

ChatProvider

Functions§

advertised_context_window
Read the context window the endpoint advertises for one model, in one of the dialects it may speak. Returns None on 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.