Skip to main content

Crate arabica_provider

Crate arabica_provider 

Source
Expand description

Model-provider boundary and provider API adapters.

This crate owns provider-neutral model turns and bidirectional API wire mappings. It does not execute tools or own sessions, memory, or UI concerns.

Structs§

AnthropicModelProvider
AnthropicProviderConfig
Configuration for Anthropic’s Messages API. The cache flag only marks the immutable system/tool prefix; it never places task state in a cache block.
ApiProviderConfig
Common configuration used to construct a concrete API adapter.
BlendProvider
A named set of API providers for per-call model selection.
ChatGptCredentials
Local credential record for the official open-source Sign in with ChatGPT token-sharing flow. Secrets are deliberately omitted from Debug output.
DiscoveredModel
Metadata describing a model discovered from an upstream provider endpoint.
EchoModel
Deterministic model provider used by smoke tests and protocol demonstrations.
ExperimentControls
Explicit Chat Completions experiment settings. Unsupported endpoint parameters must produce an error; callers must not silently remove them.
GeminiGenerateContentModelProvider
GeminiProviderConfig
Configuration for a Gemini GenerateContent endpoint.
ModelProgressSink
ModelRunRequest
ModelRunResult
OpenAiChatCodec
OpenAiChatRequest
OpenAiChatResponse
OpenAiModelProvider
OpenAI-compatible adapter for Structure’s provider-neutral ModelRunRequest.
OpenAiProviderConfig
Configuration for an OpenAI-compatible Chat Completions endpoint.
OpenAiResponsesCodec
OpenAiResponsesModelProvider
OpenAI-compatible Responses adapter. It uses stateless continuation: provider output items (including encrypted reasoning) are retained in the event log and replayed verbatim on the next model step.
OpenAiResponsesRequest
ProviderError

Enums§

ApiModelProvider
Unified enum dispatch over concrete provider API adapters.
ApiType
Provider API dialect selected at the model-provider boundary.
ModelProgress

Traits§

ApiCodec
Bidirectional codec for one provider API dialect.
ModelProvider

Functions§

compile_runtime_request
Compile the provider-neutral model request into the typed Provider input.
default_chatgpt_models
is_chat_completion_candidate
Filter heuristic for candidate conversational / completion models.
lock_chatgpt_credentials
Serialize credential rotation and revocation across CLI and desktop processes. Keep the returned file alive until the credential transaction has finished.
sort_discovered_models
Sort discovered models prioritizing chat completion candidates, followed by newer creation timestamp and identifier order.