Skip to content

Models and Channels

NebulaRaven edited this page Aug 13, 2026 · 1 revision

Models and Channels

简体中文 · Home

Each channel stores its own models, API endpoint, credentials, tool mode, streaming preferences, timeouts, retries, headers, body overrides, context thresholds, and token-counting strategy. Existing channels can be converted between the four types: common fields are retained while provider-specific fields reset to the new type's defaults.

Channel types

Type Best for Highlights
Gemini Google Gemini API and compatible services Native function calling, multimodal input, reasoning level or budget, history image limits
OpenAI Compatible OpenAI Chat Completions, DeepSeek, relays, and compatible gateways Common sampling and reasoning parameters, custom headers/body, broad compatibility
OpenAI Responses /v1/responses-style APIs Responses tools, input content, and Responses token counting
Anthropic Claude API tool_use, extended thinking, Prompt Caching, and count_tokens

Tool modes

  • function_call uses the provider's native tool format and should normally be preferred.
  • xml injects tools as XML for models with unreliable or missing native tool support.
  • json injects structured JSON instructions for models that follow JSON text more reliably.

If a model does not call tools or frequently produces invalid arguments, try xml or json. Tool availability also depends on Settings → Tools, the prompt mode's tool policy, and auto-execution rules.

Common settings

  • Connection: API URL, API key, and model list.
  • Generation: temperature, output token limit, top_p, and provider-supported sampling fields.
  • Reasoning: effort, summary, reasoning budget, or level, depending on the provider and model.
  • Reliability: request timeout, retry count and interval, and streaming preference.
  • Compatibility: custom headers and body fields for trusted services.
  • Context: model context thresholds, trimming or summarization policy, and multimodal history limits.

Token counting

Choose provider-default counting, Gemini countTokens, an OpenAI-format counting endpoint, OpenAI Responses, Anthropic count_tokens, or local estimation. Remote counts can match provider billing more closely but add requests; local estimation is faster but approximate.

Choosing a channel

  • Prefer the native channel for an official provider API.
  • Relays and self-hosted gateways usually use OpenAI Compatible with service-specific URL, headers, and body settings.
  • Use OpenAI Responses when you need its native input or tool semantics.
  • For long-context work, consider context thresholds, automatic summarization, caching behavior, and attachment size together.

API keys are sensitive. Enter them only in GrayCode channel settings; never commit them, paste them into Issues, or send them to a model through chat.

Clone this wiki locally