Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Surface capability matrix

The Rust crate is the engine. The CLI calls it in-process, the proxy places an HTTP boundary around it, and the language clients speak that proxy contract.

Availability: Crate: in-process Rust · CLI: human workflow · Proxy: language-neutral server · Clients: proxy SDKs

Choose the boundary

Rust crateCLIHTTP proxyLanguage clients
Primary entrypointllmshim::completion / streamllmshim chatPOST /v1/chatchat / stream method
TransportIn-process calls; engine uses provider HTTPSTerminal around the engineJSON over HTTP; SSE for streamsHTTP/SSE to the proxy
Conversation stateYour applicationCLI processCallerCaller
Provider keysRust processCLI processProxy processProxy process, never client requests
Request contractOpenAI-shaped serde_json::ValueCLI-ownedCompact ChatRequestNative wrapper around ChatRequest
Non-stream resultOpenAI Chat Completions-shaped ValueRendered text/usageCompact ChatResponseNative wrapper around ChatResponse
StreamingNormalized OpenAI-delta JSON stringsRendered liveTyped SSEIterator, async iterator, channel, or block over typed events
Process behaviorEmbeddedOne CLI processLong-running serverPython/TS auto-start a bundled proxy; Go/Ruby connect to one

No surface stores server-side conversation memory. The caller resends history; the CLI merely does that for its current interactive session.

Where request features go

MeaningRust crateCLI chatHTTP proxyLanguage clients
Modeltop-level modelpicker and /modeltop-level modelrequest/model argument
Messagestop-level messagescurrent session historytop-level messagesrequest/messages argument
Portable controlstop-level fieldsCLI-selected defaultsfields under configconvenience arguments or config
Toolstop-level toolsno tool loopprovider_config.toolsPython/Ruby convenience; otherwise provider_config
Native controlstop-level x-openai, x-anthropic, or x-gemininot exposedsame namespace inside provider_configprovider_config
Fallbackscompletion_with_fallback configurationnot exposedtop-level fallbackfallback request field

The proxy's provider_config object is merged into the OpenAI-shaped engine request. That is why tools and native namespaces move under it without changing their inner shapes.

Build features

CapabilityCargo feature
Core translation, Rust API, and CLI chat/config commandsdefault build; no optional feature
llmshim proxy and the Rust llmshim::proxy moduleproxy
Redis-coordinated proxy rate limitsredis-coordination (includes proxy)

The Homebrew package and the binaries bundled by Python and TypeScript include proxy support. Go and Ruby are pure HTTP clients and require a separately running proxy.

One typed-wrapper limitation matters for Gemini tool loops: raw proxy JSON round-trips thought_signature, but the Go and Ruby typed structs do not currently surface it. Use raw JSON if that field is required.

For shape details, continue to the request field map and HTTP API.