Skip to content

Models

ostk has a provider-neutral scheduling interface with direct, gateway, and local routes. A route existing in code is not the same as every model version being verified: tool schemas, streaming, reasoning, and usage accounting vary by integration.

Canonical project tasks, decisions, pages, and audit remain local across routes. Full conversation continuity is a separate capability. Generic MCP clients load stored pages inline; Anthropic sessions can additionally use Anthropic Files for context efficiency and cross-host recovery. Check the route status and last-verified evidence before treating a model switch as a product guarantee.

Anthropic FULL
MODELS
claude-* models supported by the configured Anthropic API version
CONTEXT / WIRE
200k tokens — Native
FEATURES
Tool use, extended thinking, streaming, prompt caching, vision, file upload, batch API, token counting, model listing, speed mode, citations
API KEY
ANTHROPIC_API_KEY
SOURCE
src/cpu/anthropic.rs:257–297
Google Gemini FULL
MODELS
gemini-* models supported by the configured Google API version
CONTEXT / WIRE
1M tokens — Gemini API adapter
FEATURES
Tool use, thinking (auto for 3.x models, thinkingLevel: HIGH), streaming. No client-side prompt caching — server-side only.
API KEY
GEMINI_API_KEY (or GOOGLE_API_KEY)
SOURCE
src/cpu/gemini.rs:32–70, 299–319
Mistral FULL
MODELS
mistral-*, codestral*, ministral*, devstral*, magistral*
CONTEXT / WIRE
256k tokens — OpenAI-compat
FEATURES
Tool use, streaming. No thinking mode. ostk handles Mistral-specific quirks: tool name injection (required by API), tool ID remapping (9 alphanumeric chars).
API KEY
MISTRAL_API_KEY
SOURCE
src/cpu/mistral.rs:24–45, 145–220
OpenAI IMPLEMENTED
MODELS
gpt-*, o1*, o3*, o4*
CONTEXT / WIRE
Model/version-dependent — Native Responses API
FEATURES
Tool use, streaming, encrypted reasoning continuity where supported. Verify the exact model/version in the compatibility evidence.
API KEY
OPENAI_API_KEY
SOURCE
src/cpu/openai.rs, src/cpu/providers.rs:111–120
OpenRouter GATEWAY
MODELS
Explicit openrouter/<provider>/<model> and supported org/model routes
CONTEXT / WIRE
Model-dependent — OpenAI-compatible gateway
FEATURES
Tool use and streaming when the selected upstream preserves the expected OpenAI-compatible semantics. Not a universal fallback or feature-parity promise.
API KEY
OPENROUTER_API_KEY
SOURCE
src/cpu/openrouter.rs:12–51
Ollama (local) LOCAL / MODEL-SPECIFIC
MODELS
local/<model>, ollama/<model>, or model:tag
CONTEXT / WIRE
Model-dependent — OpenAI-compatible local endpoint
FEATURES
Tool use and streaming depend on the loaded model and Ollama build. Models with a ":" separator auto-route here.
API KEY
None required (OLLAMA_HOST to override endpoint)
SOURCE
src/cpu/mod.rs:437–454, providers.rs:62–68
Apple on-device EXPERIMENTAL
MODELS
apple/default
CONTEXT / WIRE
4k tokens — OpenAI-compat
FEATURES
Streaming only. macOS only. Routes to the olleh local service on port 11941. Suitable for preprocessing, not primary agent work.
API KEY
None (APPLE_MODEL_HOST to override)
SOURCE
src/cpu/mod.rs:439–446, model_registry.rs:196–201
ADDITIONAL_IMPLEMENTED_ROUTES

The current kernel also contains direct bare-prefix routes for DeepSeek, Moonshot/Kimi, and xAI, plus an Apple-Silicon MLX route with a managed mlx_lm.server lifecycle. These are implemented code paths, not a claim that every current model version has passed an end-to-end acceptance run. Consult dated compatibility evidence before publishing a supported badge.

How FROM auto Picks a Model

When an Agentfile says FROM auto (or no FROM at all), ostk scores available models based on which API keys are present. Source: src/commands/run.rs:89–197.

01
Runtime override: staging/preferred_model (set by :model in TUI)
02
HUMANFILE MODEL directive (highest-priority static config)
03
HUMANFILE FALLBACK directive (secondary static config)
04
Environment scoring: scan for API keys and rank by capability. claude-opus-4-6 + ANTHROPIC_API_KEY scores 100; claude-sonnet-4-6 scores 90; gpt-4o + OPENAI_API_KEY scores 60; gemini-2.0-flash + GEMINI_API_KEY scores 50.
05
Default fallback: claude-sonnet-4-6 (run.rs:196)

OSTK_MODEL env var overrides everything — if set, it's used regardless of HUMANFILE or FROM. Source: src/cpu/context.rs:116.

Four places to set a model, in priority order:

OSTK_MODEL env var Session-wide override. Ignores everything else. OSTK_MODEL=gemini-2.5-pro ostk run agents/worker.af
FROM <model> in Agentfile Per-agent. The agent always runs this model. FROM claude-sonnet-4-6
HUMANFILE MODEL directive Project-wide default. Applies when FROM is auto or absent. MODEL claude-opus-4-6
--model flag on ostk kernel spawn Per-spawn override. Takes precedence over Agentfile FROM auto. ostk kernel spawn worker --model gemini-2.5-pro "task"

Not every provider supports every feature. The CpuDriver trait provides a common surface, but the underlying APIs vary. This matrix shows what actually works per provider at the driver level.

Feature Anthropic Gemini Mistral OpenAI Ollama
Tool use
Streaming
Extended thinking ✓ (3.x) built-in*
Prompt caching server
Vision/images model
File upload API
Token counting
Batch API
Speed mode
Citations

= the selected driver implements a translation path, not that every current model version is acceptance-tested. = not available in that driver. server = provider-managed. built-in* = reasoning is model behavior. model = depends on the loaded Ollama model. Direct DeepSeek, Moonshot, xAI, OpenRouter, and MLX routes require their own compatibility evidence and are not implied by this selected-driver table.

Gemini 3.x thinking: When the model name contains "3.1" or "3-", the driver automatically sends thinkingConfig.includeThoughts: true and thinkingLevel: "HIGH". Gemini 2.x models get standard config only. Source: gemini.rs:105–121.
Mistral tool ID remapping: Mistral requires tool call IDs to be exactly 9 alphanumeric characters. Anthropic emits toolu_ prefixed IDs that are longer. ostk remaps them transparently. Source: mistral.rs:191–220.
Ollama auto-detection: Any model name containing a colon (e.g., codestral:22b) is auto-routed to Ollama without the local/ prefix. Source: model_registry.rs:251–253.
OpenAI routing: Bare gpt-* and o-series names use the native OpenAI Responses driver and fail if its required key is unavailable. Use an explicit openrouter/... model identifier when you intend to route through OpenRouter. Source: providers.rs:111–120.
DeepSeek routing: Bare deepseek-* identifiers use the direct DeepSeek endpoint and fail closed without DEEPSEEK_API_KEY. Slash-form deepseek/... identifiers remain explicit OpenRouter routes. Moonshot/Kimi and xAI have analogous direct bare-prefix routes.
HUMANFILE
MODEL claude-sonnet-4-6
FALLBACK gemini-2.5-pro
agents/cheap-lint.af
FROM local/codestral:22b
PROMPT Run eslint, fix warnings.
TOOL shell
LIMIT budget_usd 0

The HUMANFILE declares a project default and fallback; the lint agent pins a local route with FROM. Local inference has no provider token charge, although hardware and operational costs remain. Multiple routes can coexist, but preserving canonical project state is not the same as guaranteeing full conversation or feature continuity between them.