orko-providers: OpenAI-compatible engine with OpenAI and DeepSeek presets
Agent orchestration toolkit for Rust (alpha out)
Brought to you by:
samad101
Originally created by: SAMAD101
Adds the OpenAI-compatible provider engine to orko-providers, with OpenAI and DeepSeek presets.
codec: builds the Chat Completions request JSON (text, multipart content, tools) and parses the SSE stream into CompletionChunks, including tool-call deltas, usage, refusals and reasoning (reasoning_content / reasoning). It does no IO.Transport: a small object-safe trait for the HTTP call, so users can bring their own client.HyperTransport (default transport-hyper feature): hyper 1.x over async-net and rustls with native roots. It works under any executor (Tokio, smol, block_on), spawns no tasks and has a 60 s request timeout (with_timeout). It connects to all resolved addresses at once, so a dead IPv6 route doesn't hang requests.OpenAiCompatible with Quirks, plus openai() / deepseek() presets in src/providers/ and from_str("provider:model").orko::providers is wired up and documented. The examples hello_openai and hello_deepseek live at the repo root and fall back to an offline stub when no key is set.No tokio dependency is added outside orko-runtime. hyper 1.x still pulls in tokio with only the sync feature, so it shows up in Cargo.lock.
user messages until orko-core carries tool_call_id.cargo test --workspace: 14 provider tests, including a real HTTP round trip under block_on and a timeout test.cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo fmt --check and rustdoc with -D warnings are clean, and --no-default-features builds pass.🤖 Generated with Claude Code
Originally posted by: SAMAD101
Superseded by a new PR from
add-openai-compatible-providers, which adds the rest of the OpenAI-compatible presets.Ticket changed by: SAMAD101