Skip to main content

Crate odori_providers

Crate odori_providers 

Source
Expand description

Model providers — subscription-first, harness-driven.

This crate owns the implementations of Odori’s provider trait. The primary tier drives the vendors’ own harnesses as supervised subprocesses, because that is where subscription auth, session state, and vendor tooling already live:

  • Claude — headless Claude Code: claude -p --output-format stream-json, one process per turn, sessions resumed by id on retry, streaming events surfaced as activity heartbeats, exit codes mapped to a retry taxonomy.
  • Codex — codex app-server JSON-RPC, one supervised process per turn, with persisted threads resumed by id.

Harness CLIs are versioned runtime dependencies. Each provider states its minimum version and conformance baseline; newer version drift is detected and warned about, never a silent behaviour change.

The secondary tier — raw-API providers (Anthropic Messages, OpenAI Responses) — lives behind the api-anthropic / api-openai features: minimal internal loops for users without a subscription seat.

The seam this crate implements is odori_agents::provider::Provider — defined crate-side with the primitives (both ends of the seam need the agents crate’s types, so defining it there keeps the graph acyclic) and frozen so every backend and the runner share one stable turn contract.

Re-exports§

pub use claude::ClaudeConfig;
pub use claude::ClaudeProvider;
pub use claude::PINNED_VERSION;
pub use codex::CodexProvider;
pub use codex::EXPECTED_CODEX_CLI_VERSION;

Modules§

claude
The Claude subscription provider: headless Claude Code as a supervised subprocess, one claude -p invocation per harness turn.
claude_flags
Pure flag rendering for the headless Claude Code harness: the spawn-time attachment for the Claude provider, implemented against the frozen TurnTooling contract. No process is spawned here.
codex
Subscription-backed Codex provider over the app-server JSON-RPC protocol.