Model providers
OpenAI and DeepSeek share a Responses-based conversation-and-tool runner. Provider adapters handle endpoints, authentication, and request differences.
ResponsesRunner assembles history, instructions, and tools. ResponsesClient
handles HTTP and streamed response validation. Their boundary uses Responses
data contracts.
Configuration and selection
Provider definitions describe endpoints, credentials, and available model IDs.
They are persisted on the server; credentials stay out of browser responses.
Providers using local Codex login read the model picker from
$CODEX_HOME/models_cache.json (normally ~/.codex/models_cache.json). Like
Codex, Soma sorts by priority, hides unlisted models, and filters API-key logins
to API-supported models. The first available model is the default unless
--model is supplied. Reloading Soma reads updates made by Codex. Codex owns
catalog discovery and refresh; Soma never writes its files or fetches a separate
catalog. When no usable Codex catalog exists, the provider's configured model
IDs remain available. Run Codex to populate or refresh its catalog.
Reference: Codex revision 98d28aab54ed86714901b6619400598598876dd0,
codex-rs/models-manager/src/{manager,cache}.rs and
codex-rs/protocol/src/openai_models.rs.
In Settings, choose Model providers in the left navigation, then select a provider beneath it. The right pane shows its configuration, with labels beside their controls. Choose General settings to return to browser preferences. Add provider opens a separate creation page. Each page has its own URL and supports reload and browser history.
Each thread selects a provider snapshot and model. Updating the catalog takes effect in an existing thread when that definition is selected again.
Change at a step boundary
The current request and its tools finish with captured settings. The next step uses the latest accepted selection. Thread history and identity stay in place; other conversations retain their own selections.
When configurations differ, replay preserves visible text and tool calls/results while omitting foreign provider-private items. Saving provider definitions does not persist conversations.
Implementation: responses.rs.
Session statistics
The Session statistics plugin adds a row below the composer that updates after each step closes. Enable or disable it in Settings → Plugins. Select a reading to view performance, token totals, or context details. Counts include failed and interrupted steps; token totals use completed provider responses only. Reloading the browser restores the same readings from the server's history.
Output speed is summed output tokens divided by summed decode time, excluding first-token latency and tool execution. Only streamed requests reporting both usage and positive decode time contribute. Cache hit rate divides cached input by total input; it is omitted if any measured response lacks cache counts. Reasoning tokens are already included in output tokens.
Context usage is the latest measured response's input plus output, divided by its model capacity. Codex capacity comes from its local model cache. The known DeepSeek models use dsh's 1,000,000-token catalog default. Unknown capacities display an explicit unknown reading. Unreported usage is never estimated.