Skip to content

Providers and Models

Pythinker Code supports multiple LLM platforms, which can be configured via configuration files or the /login command.

Platform selection

The easiest way to configure is to run the /login command (alias /setup) in shell mode and follow the wizard to select platform and model:

  1. Select an API platform
  2. Enter your API key
  3. Select a model from the available list

After configuration, Pythinker Code will automatically save settings to ~/.pythinker/config.toml and reload.

/login currently supports the following platforms:

PlatformDescription
PythinkerPythinker platform, supports search and fetch services
OpenAI APIOfficial OpenAI API
OpenAI ChatGPT CodexOpenAI managed account login
Pythinker AI Open Platform (pythinker-ai.cn)China region API endpoint
Pythinker AI Open Platform (pythinker-ai.ai)Global region API endpoint
LM StudioLocal models served via LM Studio
OllamaLocal models served via Ollama

For other platforms, please manually edit the configuration file.

Provider types

The type field in providers configuration specifies the API provider type. Different types use different API protocols and client implementations.

TypeDescription
pythinkerPythinker API
openai_legacyOpenAI Chat Completions API
openai_responsesOpenAI Responses API
openai_codexOpenAI Responses API with managed account login (configured via /login, not by hand)
anthropicAnthropic Claude API
geminiGoogle Gemini API
vertexaiGoogle Vertex AI

All provider types support adding custom HTTP headers via the custom_headers field. See Configuration files for details.

pythinker

For connecting to Pythinker API, including Pythinker and Pythinker AI Open Platform.

toml
[providers.pythinker-for-coding]
type = "pythinker"
base_url = "https://api.pythinker.com/coding/v1"
api_key = "sk-xxx"

openai_legacy

For platforms compatible with OpenAI Chat Completions API, including the official OpenAI API and various compatible services.

toml
[providers.openai]
type = "openai_legacy"
base_url = "https://api.openai.com/v1"
api_key = "sk-xxx"

openai_responses

For OpenAI Responses API (newer API format).

toml
[providers.openai-responses]
type = "openai_responses"
base_url = "https://api.openai.com/v1"
api_key = "sk-xxx"

anthropic

For connecting to Anthropic Claude API.

toml
[providers.anthropic]
type = "anthropic"
base_url = "https://api.anthropic.com"
api_key = "sk-ant-xxx"

gemini

For connecting to Google Gemini API.

toml
[providers.gemini]
type = "gemini"
base_url = "https://generativelanguage.googleapis.com"
api_key = "xxx"

vertexai

For connecting to Google Vertex AI. Requires setting necessary environment variables via the env field.

toml
[providers.vertexai]
type = "vertexai"
base_url = "https://xxx-aiplatform.googleapis.com"
api_key = ""
env = { GOOGLE_CLOUD_PROJECT = "your-project-id" }

Model capabilities

The capabilities field in model configuration declares the capabilities supported by the model. This affects feature availability in Pythinker Code.

CapabilityDescription
thinkingSupports thinking mode (deep reasoning), can be toggled
always_thinkingAlways uses thinking mode (cannot be disabled)
image_inSupports image input
video_inSupports video input
toml
[models.gemini-3-pro-preview]
provider = "gemini"
model = "gemini-3-pro-preview"
max_context_size = 262144
capabilities = ["thinking", "image_in"]

thinking

Declares that the model supports thinking mode. When enabled, the model performs deeper reasoning before answering, suitable for complex problems. In shell mode, you can use the /model command to switch models and thinking mode, or control it at startup with --thinking / --no-thinking flags.

always_thinking

Indicates the model always uses thinking mode and cannot be disabled. For example, models with "thinking" in their name like pythinker-ai-thinking typically have this capability. When using such models, the /model command won't prompt for thinking mode toggle.

image_in

When image input capability is enabled, you can paste images in conversations (Ctrl-V).

video_in

When video input capability is enabled, you can send video content in conversations.

Search and fetch services

The SearchWeb and FetchURL tools depend on external services, currently only provided by the Pythinker platform.

When selecting the Pythinker platform using /login, search and fetch services are automatically configured.

ServiceCorresponding toolBehavior when not configured
pythinker_ai_searchSearchWebTool unavailable
pythinker_ai_fetchFetchURLFalls back to local fetching

When using other platforms, the FetchURL tool is still available but will fall back to local fetching.