logo
Development
Search
Model Configuration

Model Configuration

Overview

The Model Configuration page is used to manage LLM providers and model parameters. The App side supports configuring multiple providers simultaneously, and the system automatically switches the API format and capability detection based on the selected model.

Model Configuration Page-CN


Supported Providers

Provider API Format Description
Anthropic anthropic Claude series models
OpenAI openai GPT / o series models
DeepSeek openai DeepSeek-chat / reasoner
Qwen (Tongyi Qianwen) openai Qwen-plus / Qwen-max
Gemini openai Google Gemini series
Custom openai / anthropic Third-party services compatible with the OpenAI or Anthropic format

Configuration Items

Parameter Description
Provider Selection Select an LLM provider from the drop-down list
API Key Provider API key (stored encrypted)
Base URL API endpoint address (required for custom providers)
apiFormat API protocol format: anthropic or openai
Model Selection Select from the provider's list of available models
tokensRespLimit Maximum number of output tokens per turn

Model Capability Flags

The system automatically detects model capabilities via resolveCapabilities, which affects multimodal input processing:

Capability Description Impact
vision Image understanding Whether image input is accepted
document Document understanding Whether document input such as PDF is accepted
audio Audio understanding Whether audio input is accepted
tool_use Tool calling Whether function calling is supported

Context Window

Default context window size for each model:

Model Context Window
Claude Sonnet 4 / Opus 4 / Claude 4 200,000 tokens
GPT-4o / GPT-4o-mini / GPT-4-turbo 128,000 tokens
GPT-4.1 1,000,000 tokens
o3 / o4-mini 200,000 tokens
DeepSeek-chat / DeepSeek-reasoner 64,000 tokens
Qwen-plus / Qwen-max 128,000 tokens

For the complete list of models, refer to Supported Models List.



Operation Guide

How to Configure a Model

  1. Open the App → left-side settings menu → Model
  2. Select the LLM provider you want to use from the provider list (e.g., Anthropic)
  3. Enter the API Key provided by that provider
  4. (Optional) If you are using a third-party compatible service, change the Base URL to the endpoint address provided by the service
  5. Select a specific model from the model drop-down list (e.g., Claude Sonnet 4)
  6. Click Save

Note: The API Key is stored locally in encrypted form and is not uploaded to the cloud. Never share your API Key with others or commit it to a code repository.

How to Switch Models

After configuring multiple providers, you can switch the currently used model at any time. After switching, the next conversation will use the new model. The history of existing conversations is not affected.


Model Selection Recommendations

Different scenarios call for different models. The following are recommended combinations:

Use Case Recommended Model Reason
Everyday conversation and lightweight tasks GPT-4o-mini / Qwen-plus Fast response, low cost
Complex reasoning and long document analysis Claude Opus 4 / Claude Sonnet 4 Strong reasoning, 200K long context, supports document input
Code development and debugging DeepSeek-chat / Claude Sonnet 4 Outstanding code comprehension
Ultra-long context (entire codebase) GPT-4.1 1M token context window
Requires image understanding Claude Sonnet 4 / GPT-4o Supports vision capability
Cost-sensitive Qwen-plus / DeepSeek-chat Lowest price
Requires deep reasoning (math/logic) o3 / DeepSeek-reasoner Reasoning-chain models, but DeepSeek-reasoner does not support tool calling

Tip: If you are unsure which to choose, we recommend starting with Claude Sonnet 4 — it delivers balanced performance across reasoning, code, tool calling, and multimodality.


Real Impact of the Context Window on Users

The context window determines how much content the Agent can "remember" within a single conversation:

Window Size Roughly Equivalent To Applicable Scenarios
64K tokens ~100 pages of plain text or ~5 medium-sized code files Brief conversations, single-file operations
128K tokens ~200 pages of plain text or ~10 code files Medium-complexity projects, multi-file operations
200K tokens ~300 pages of plain text or ~15 code files Complex projects, long conversations, PDF document analysis
1M tokens ~1500 pages of plain text or ~70 code files Very large codebase analysis, book-level documents

When the conversation content approaches the window limit, the system automatically triggers Context Compression, intelligently retaining the most important information.


Impact of tokensRespLimit

tokensRespLimit controls the maximum number of tokens in the Agent's reply per turn:

Setting Value Impact
Too small (e.g., 500) The Agent's reply may be truncated, and complex analysis or long code generation will be incomplete
Moderate (e.g., 4096, recommended default) Balances reply completeness and response speed
Too large (e.g., 32000) The Agent can produce very long replies, but this increases wait time and cost

Recommendation: Keeping the default value is sufficient. If you frequently encounter truncated replies, you can increase it appropriately.


FAQ

Invalid API Key

  • Confirm the Key was copied correctly (watch for leading and trailing spaces)
  • Confirm that the correct provider is selected for the Key
  • Confirm the Key has not expired or been revoked

Request Timeout

  • Check your network connection
  • If using a custom Base URL, confirm the address is reachable
  • Some models may respond slowly under high load; you can retry later

Poor Reply Quality

  • Try switching to a more powerful model (e.g., from GPT-4o-mini to Claude Sonnet 4)
  • Check whether tokensRespLimit is set too small
  • Optimize your prompt and provide clearer instructions