Model Provider Configuration

July 13, 2026 · View on GitHub

English | 简体中文

SearchOS constructs its 11 model roles—such as orchestrator, extraction, and judge—through searchos/config/models.py:get_model_for(role), backed by LangChain's ChatOpenAI and ChatAnthropic clients.

The fastest setup path is the interactive wizard. The first python -m searchos run opens it automatically, or you can rerun it at any time with python -m searchos --setup. For a manual setup, two environment variables are enough:

# .env (see .env.example in the repository root)
SF_PROVIDER=zhipu-coding
ZHIPU_API_KEY=xxx

SF_PROVIDER generates default bindings for every role across five profiles: main, judge, fast, synthesis, and reformat. Advanced users can override individual values with SF_PROFILES__* and SF_ROLES__*; these values are recursively merged without discarding other preset fields.

Preset overview

Coding plans using the Anthropic protocol

These vendor plans expose Anthropic-compatible endpoints originally intended for coding clients. SearchOS connects through ChatAnthropic with a custom base_url.

SF_PROVIDERVendorEndpointKey environment variableDefault models
zhipu-codingZhipu GLM Coding Plan (China)open.bigmodel.cn/api/anthropicZHIPU_API_KEYglm-5.2 / glm-4.7
zai-codingZ.ai GLM Coding Plan (international)api.z.ai/api/anthropicZAI_API_KEYglm-5.2 / glm-4.7
kimi-codingKimi For Codingapi.kimi.com/codingKIMI_API_KEYkimi-for-coding
moonshot-anthropicMoonshot pay-as-you-goapi.moonshot.cn/anthropicMOONSHOT_API_KEYkimi-k2.5
minimax-codingMiniMax Coding Planapi.minimaxi.com/anthropicMINIMAX_API_KEYMiniMax-M3
qwen-codingAlibaba Cloud Model Studio Coding Plancoding.dashscope.aliyuncs.com/apps/anthropicDASHSCOPE_API_KEYqwen3.7-plus
volcengine-codingVolcengine Ark Coding Planark.cn-beijing.volces.com/api/codingARK_API_KEYdoubao-seed-code-preview-latest
deepseek-anthropicDeepSeek pay-as-you-goapi.deepseek.com/anthropicDEEPSEEK_API_KEYdeepseek-v4-flash
anthropicAnthropic APIapi.anthropic.comANTHROPIC_API_KEYclaude-sonnet-5 / claude-haiku-4-5

Important notes:

  • Keys are product-specific. Kimi coding-plan keys come from kimi.com/code/console and are separate from Moonshot platform keys. Alibaba coding-plan keys use the sk-sp- prefix. Zhipu team coding keys and MiniMax subscription keys are also separate from their pay-as-you-go keys.
  • Check usage terms. Some coding plans authorize only interactive use in supported coding tools. Confirm the vendor's current terms before using a subscription key in an agent framework. Pay-as-you-go API keys are not subject to coding-plan restrictions.
  • Claude subscription tokens are unsupported. OAuth tokens produced by claude setup-token are restricted to Claude Code and claude.ai under Anthropic's terms. The anthropic preset accepts Console API keys only.
  • Newer Anthropic models such as Opus 4.7+ and Sonnet 5 reject temperature; the relevant presets omit it automatically. Other Anthropic-compatible vendor endpoints are unaffected.

Pay-as-you-go APIs using the OpenAI protocol

SF_PROVIDERVendorEndpointKey environment variableDefault models
deepseekDeepSeekapi.deepseek.comDEEPSEEK_API_KEYdeepseek-v4-flash
zhipuZhipu (China)open.bigmodel.cn/api/paas/v4ZHIPU_API_KEYglm-5.2 / glm-4.7-flash
zaiZ.ai (international)api.z.ai/api/paas/v4ZAI_API_KEYglm-5.2 / glm-4.7-flash
moonshot (alias kimi)Moonshotapi.moonshot.cn/v1MOONSHOT_API_KEYkimi-k2.5
minimaxMiniMaxapi.minimaxi.com/v1MINIMAX_API_KEYMiniMax-M3
dashscope (alias qwen)Alibaba Cloud Model Studiodashscope.aliyuncs.com/compatible-mode/v1DASHSCOPE_API_KEYqwen3.7-plus
volcengine (aliases doubao, ark)Volcengine Arkark.cn-beijing.volces.com/api/v3ARK_API_KEYdoubao-seed-2.0-pro
openaiOpenAI APIapi.openai.com/v1OPENAI_API_KEYgpt-5.5
openrouterOpenRouteropenrouter.ai/api/v1OPENROUTER_API_KEYanthropic/claude-sonnet-4.5
siliconflowSiliconFlow (China)api.siliconflow.cn/v1SILICONFLOW_API_KEYdeepseek-ai/DeepSeek-V3.2
geminiGoogle Gemini OpenAI compatibility layergenerativelanguage.googleapis.com/v1beta/openai/GEMINI_API_KEYgemini-3.5-flash
xaixAIapi.x.ai/v1XAI_API_KEYgrok-4.3

Important notes:

  • DeepSeek limits output to 8,192 tokens, so SearchOS clamps the reformat profile automatically. For very large table exports, use a provider with a larger output window. Legacy deepseek-chat and deepseek-reasoner names are mapped to v4-flash.
  • OpenAI GPT-5 reasoning models reject temperature; their presets omit it.
  • Override SF_API_BASE to select international MiniMax, Moonshot, Alibaba, or SiliconFlow endpoints. China and international SiliconFlow accounts are not interchangeable.
  • Volcengine model IDs may depend on your console configuration. Override SF_MODEL when necessary.

Local deployments

SF_PROVIDER=ollama
SF_MODEL=qwen3:32b          # Required

SF_PROVIDER=vllm
SF_MODEL=Qwen/Qwen3-32B     # Required; override SF_API_BASE if the port is not 8000

Local services do not require a real key. The presets provide the non-empty placeholders ollama and EMPTY where the client requires one.

Five profiles and their role bindings

Each preset creates five profiles. Quality-sensitive judging and export roles use the primary model, while high-volume extraction and synthesis roles use the lighter model to control cost.

ProfileRolesModel tierTemperatureOutput limit
mainorchestrator / sub_agent / skill_evolver / post_mortem / skill_routerPrimary0.716384
judgejudgePrimary0.016384
fastextraction / alias_resolver / skill_runtimeLight0.032768
synthesissynthesisLight0.332768
reformatreformat (evaluation table export)Primary0.065536

Use SF_MODEL to override the primary model and SF_FAST_MODEL to override the light model. Presets without a separate light model fall back to the primary one. Provider capabilities may clamp output limits, such as 8,192 for DeepSeek or 32,768 for the Kimi coding plan.

Light-profile defaults were checked against vendor documentation in July 2026. Extraction inputs are often long, so models limited to an 8K context window are not suitable.

VendorLight-profile defaultNotes
Zhipu / Z.ai pay-as-you-goglm-4.7-flashFree tier, 30B, function calling and JSON support
Alibaba Cloud Model Studioqwen3.5-flash1M context; qwen-turbo retires on July 13, 2026
SiliconFlowQwen/Qwen3-30B-A3B-Instruct-2507The older Qwen/Qwen3-30B-A3B ID is unavailable
MiniMaxMiniMax-M2.7The least expensive currently listed tier rather than a dedicated light model
OpenAIgpt-5.4-miniThe 5.5 generation has no mini/nano model
Geminigemini-3.1-flash-litegemini-3.5-flash-lite does not exist
OpenRoutergoogle/gemini-3.5-flash
Moonshot, DeepSeek, xAI, Volcengine, and coding-plan presetsPrimary-model fallbackOverride SF_FAST_MODEL when your account exposes a suitable light model

Fine-grained overrides

Overrides are recursively merged with the selected preset, so changing one field does not discard the others:

# Bind one role to a different profile
SF_ROLES__EXTRACTION=main

# Override fields on an existing profile (replace - with _ in environment paths)
SF_PROFILES__MAIN__TEMPERATURE=0.3
SF_PROFILES__MAIN__ENABLE_THINKING=true
SF_PROFILES__FAST__MAX_TOKENS=16384

# Define a custom profile and bind it to a role
SF_PROFILES__MYPROF__MODEL=glm-5-turbo
SF_PROFILES__MYPROF__API_BASE=https://open.bigmodel.cn/api/paas/v4
SF_PROFILES__MYPROF__API_KEY_ENV=ZHIPU_API_KEY
SF_ROLES__SKILL_ROUTER=myprof

See searchos/config/settings.py for all ModelProfile fields, including provider, thinking style, RPM/TPM limits, and extra request parameters.

Provider compatibility notes

BehaviorSearchOS handling
OpenAI, Gemini, and OpenRouter reject unknown request fieldsthinking_style=none; no thinking switch is injected
DashScope expects top-level enable_thinkingthinking_style=enable_thinking
vLLM and SiliconFlow use chat_template_kwargs.enable_thinkingthinking_style=chat_template_kwargs
Claude Opus 4.7+ and GPT-5 models reject temperaturetemperature_ok=False; all profiles omit it
Ollama and vLLM require a non-empty keyPresets provide api_key_fallback placeholders
DeepSeek's Anthropic endpoint ignores top_k, cache_control, and similar fieldsNo special handling is required

Search backends

SearchOS also needs a Web search API. The setup wizard configures it alongside the model provider.

SF_SEARCH_PROVIDERServiceKey environment variableNotes
serperSerper.devSERPER_API_KEYRecommended Google results backend
tavilyTavilyTAVILY_API_KEYRequires pip install 'searchos[tavily]'
ragflowRagFlowAnt Group internal backend; unavailable to external users

Without SF_SEARCH_PROVIDER, SearchOS infers Serper and then Tavily from the available keys. If neither key exists, it falls back to RagFlow for backward compatibility. Page retrieval is configured separately through SF_BROWSER_BACKEND; the default is jina, and SF_JINA_API_KEY is recommended to avoid low unauthenticated rate limits.

Vendor endpoints and model IDs were checked against official documentation in July 2026. Each preset in searchos/config/providers.py includes its source doc_url. Providers change quickly; if an endpoint or model is retired, override SF_API_BASE or SF_MODEL and open an issue with the updated details.