Gokin supports 7 AI model providers. All except Gemini and Ollama use an Anthropic-compatible API.

Overview#

ProviderDefault ModelAuthContextNotes
Geminigemini-3-flash-previewAPI Key + OAuth1MFree tier, Google OAuth
Anthropicclaude-sonnet-4-5-20250929API Key200KExtended thinking
DeepSeekdeepseek-chatAPI Key64K+Affordable reasoning
GLMglm-4.7API Key128KCoding Plan (Z.ai)
MiniMaxMiniMax-M2.5API Key1MHuge context window
Kimikimi-k2.5API Key256K+Thinking models
Ollamallama3.2Not requiredVariesLocal models, offline

Gemini (Google)#

Models:

ModelDescriptionCost
gemini-3-flash-previewFast and cheap$0.50 / $3 per 1M tokens
gemini-3-pro-previewMost powerful$2 / $12 per 1M tokens
gemini-2.5-flashCode Assist (OAuth)Free
gemini-2.5-proCode Assist (OAuth)Free

Environment variables (in priority order):

export GOKIN_GEMINI_KEY="your-key"
export GEMINI_API_KEY="your-key"
export GOOGLE_API_KEY="your-key"

Get a key: aistudio.google.com/apikey

OAuth for Gemini#

Gemini supports authorization via Google account without an API key:

# Login via OAuth
/oauth-login

# Logout
/oauth-logout

Uses the Code Assist API (cloudcode-pa.googleapis.com). Tokens are stored in configuration and refreshed automatically.


Anthropic (Claude)#

Models:

ModelDescription
claude-opus-4-6Most powerful Claude model
claude-sonnet-4-5-20250929Balance of speed and quality
claude-haiku-4-5-20251001Fast and affordable

Environment variables:

export GOKIN_ANTHROPIC_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"

Get a key: console.anthropic.com/settings/keys

Extended Thinking:

model:
  enable_thinking: true
  thinking_budget: 4096

DeepSeek#

Models:

ModelDescription
deepseek-chatPowerful coding assistant
deepseek-reasonerExtended reasoning

Environment variables:

export GOKIN_DEEPSEEK_KEY="your-key"
export DEEPSEEK_API_KEY="your-key"

Get a key: platform.deepseek.com/api_keys


GLM (Z.ai / Zhipu)#

Models:

ModelDescription
glm-5Latest GLM model
glm-4.7Coding assistant, 131K max output

Environment variables:

export GOKIN_GLM_KEY="your-key"
export GLM_API_KEY="your-key"

Get a key: open.bigmodel.cn


MiniMax#

Models:

ModelDescription
MiniMax-M2.5Flagship: 1M context, strong coding

Environment variables:

export GOKIN_MINIMAX_KEY="your-key"
export MINIMAX_API_KEY="your-key"

Get a key: platform.minimaxi.com


Kimi (Moonshot AI)#

Models:

ModelDescription
kimi-k2.5Multimodal model
kimi-k2-thinking-turboExtended reasoning, 60-100 tok/s
kimi-k2-turbo-previewFast coding, 256K context

Environment variables:

export GOKIN_KIMI_KEY="your-key"
export KIMI_API_KEY="your-key"
export MOONSHOT_API_KEY="your-key"

Get a key: platform.moonshot.ai/console/api-keys


Ollama (Local Models)#

Ollama enables fully offline operation without API keys.

Requirements: running Ollama server on localhost:11434

Auto-detected model families:

FamilyExample Models
Llamallama3.2, llama3.1, llama3, llama2
Qwenqwen2.5-coder, qwen2.5, qwen2
Mistralmistral-nemo, mistral, mixtral
Phiphi4, phi3
Codecodellama, starcoder2, deepseek-coder, codegemma
Othergemma2, command-r-plus, vicuna, yi, solar

Environment variables (optional):

export GOKIN_OLLAMA_KEY="your-key"   # For remote server with auth
export OLLAMA_API_KEY="your-key"

Tool Call Fallback#

Models without native tool calling support use a text fallback: Gokin parses {"tool":"name","args":{}} JSON format from model responses.

Model Profiles#

Gokin automatically detects model capabilities:

ModelContextToolsCodingSmall
llama3.2128KYesNoYes
qwen2.5-coder32KYesYesNo
mistral-nemo128KYesNoNo
phi416KYesNoYes
command-r-plus128KYesNoNo

Switching Provider and Model#

# Via slash command
/provider anthropic
/model claude-sonnet-4-5-20250929

# Via configuration
# ~/.config/gokin/config.yaml
api:
  active_provider: gemini
model:
  name: gemini-3-flash-preview

Model Presets#

PresetDescription
codingOptimized for code generation
fastMinimum latency
balancedBalance of quality and speed
creativeHigh temperature for generation
model:
  preset: coding

Provider Failover#

Gokin automatically switches to a fallback provider on errors:

model:
  name: claude-sonnet-4-5-20250929
  provider: anthropic
  fallback_providers:
    - deepseek
    - gemini
    - ollama

Provider health:

  • Each provider has a score from -20 to +8
  • Success: +1 to score
  • Fatal error: -2 to score
  • Data stored in ~/.config/gokin/provider_health.json
  • Providers with higher scores are tried first
GitHub MIT License © Gokin Contributors