Skip to main content

Model Configuration Guide

A Model in Wegent defines the AI model configuration, specifying which AI service to use, how to authenticate, and which model to employ. This guide will help you configure models through the Web interface.


πŸ“‹ Table of Contents​


🎯 What is a Model​

A Model is the "brain" of a Bot, determining which AI model the Bot uses for thinking and reasoning.

Position in Architecture​

Agent (Team) = Bot(s) + Collaboration Mode
Bot = Executor (Shell) + Model (Brain) + Prompt (Personality)

Analogy:

  • Executor (Shell): The runtime environment (ClaudeCode, Agno, Dify, Chat)
  • Model: The AI brain (Claude, GPT-4, Gemini)
  • Prompt: The personality and expertise

Model Types​

Wegent supports multiple model types:

TypeDescriptionUse Cases
LLMLarge Language Models for chat and codeGeneral AI tasks, coding
EmbeddingText embedding modelsKnowledge base, RAG
RerankReranking modelsSearch result optimization

πŸ“Š Model Selection Guide​

ModelSpeedCostCapabilityBest For
Claude Haiku 4.5⚑⚑⚑ FastπŸ’° Low⭐⭐ BasicSimple tasks, documentation
Claude Sonnet 4⚑⚑ MediumπŸ’°πŸ’° Medium⭐⭐⭐⭐ StrongDaily development (Recommended)
Claude Opus 4⚑ SlowπŸ’°πŸ’°πŸ’° High⭐⭐⭐⭐⭐ StrongestComplex architecture

OpenAI GPT Series​

ModelSpeedCostCapabilityBest For
GPT-4o⚑⚑ MediumπŸ’°πŸ’° Medium⭐⭐⭐⭐ StrongGeneral tasks (Recommended)
GPT-4 Turbo⚑⚑ MediumπŸ’°πŸ’° Medium⭐⭐⭐⭐ StrongComplex reasoning
GPT-3.5 Turbo⚑⚑⚑ FastπŸ’° Low⭐⭐⭐ MediumQuick prototyping

Google Gemini Series​

ModelSpeedCostCapabilityBest For
Gemini 3 Pro⚑⚑ MediumπŸ’°πŸ’° Medium⭐⭐⭐⭐ StrongMultimodal tasks
Gemini 2.5 Flash⚑⚑⚑ FastπŸ’° Low⭐⭐⭐ MediumQuick responses

Recommendations by Task Type​

Task TypeRecommended ModelAlternative
Daily DevelopmentClaude Sonnet 4GPT-4o
Simple TasksClaude Haiku 4.5GPT-3.5 Turbo
Code ReviewClaude Sonnet 4GPT-4o
Complex ArchitectureClaude Opus 4GPT-4
DocumentationClaude Haiku 4.5GPT-3.5 Turbo

πŸš€ Configuring Models via Web Interface​

Step 1: Navigate to Model Settings​

  1. Log in to Wegent Web interface
  2. Click Settings in the sidebar
  3. Select the Models tab

You'll see a unified model list showing both public (system) and your personal models.

Step 2: Create a New Model​

  1. Click the Create Model button
  2. Fill in the model configuration form:

Basic Information​

FieldRequiredDescription
Model TypeYesSelect: LLM, Embedding, or Rerank
Model IDYesUnique identifier (lowercase, hyphens allowed)
Display NameNoHuman-readable name for the UI

Provider Configuration​

FieldRequiredDescription
Model ProtocolYesOpenAI, Anthropic, Gemini, etc.
Model IDYesSelect from presets or enter custom
API KeyYesYour API key from the provider
Base URLNoCustom endpoint (for proxies)

Step 3: Configure Model Details​

For LLM Models:

Model Protocol: OpenAI / Anthropic / Gemini
Model ID: gpt-4o / claude-sonnet-4 / gemini-3-pro
API Key: sk-xxx... / sk-ant-xxx...
Base URL: (optional, for proxy services)

For Embedding Models:

Model Protocol: OpenAI / Cohere / Jina
Model ID: text-embedding-3-small
Dimensions: 1536 (optional)

For Rerank Models:

Model Protocol: Cohere / Jina
Model ID: rerank-english-v3.0
Top N: 10 (optional)

Step 4: Test Connection​

Before saving, click Test Connection to verify:

  • βœ… API Key validity
  • βœ… Model availability
  • βœ… Network connectivity

Step 5: Save Configuration​

Click Save to create the model. It will appear in your model list and can be used in Bot configurations.


πŸ”‘ API Key Acquisition​

Anthropic API Key​

  1. Visit Anthropic Console
  2. Log in or create an account
  3. Click Create Key
  4. Copy and save the key (format: sk-ant-api03-xxx...)

⚠️ Important: API Key is only shown once!

OpenAI API Key​

  1. Visit OpenAI Platform
  2. Log in or create an account
  3. Click Create new secret key
  4. Copy and save the key (format: sk-xxx...)

Google Gemini API Key​

  1. Visit Google AI Studio
  2. Log in with your Google account
  3. Click Create API Key
  4. Copy and save the key (format: AIza...)

Security Best Practices​

βœ… Do:

  • Store keys in environment variables
  • Use key management services for production
  • Rotate keys regularly
  • Limit access to authorized team members

❌ Don't:

  • Commit keys to Git repositories
  • Share keys in public places
  • Write keys in frontend code
  • Store keys in plain text files

πŸ”„ Testing Model Connection​

Via Web Interface​

  1. In the Model Edit dialog, fill in all required fields
  2. Click the Test Connection button
  3. Check the result:
    • βœ… "Successfully connected" - Configuration is valid
    • ❌ Error message - Check your settings

Common Test Errors​

ErrorCauseSolution
401 UnauthorizedInvalid API KeyRegenerate and update key
404 Not FoundWrong model IDCheck model name spelling
429 Rate LimitToo many requestsWait and retry
Network ErrorConnection issueCheck network/proxy settings

πŸ€– Using Models in Bots​

When creating or editing a Bot:

  1. In the Bind Model section, keep "Advanced Mode" OFF
  2. Select a model from the dropdown list
  3. The dropdown shows both public and your personal models

Method 2: Advanced Mode (Custom Configuration)​

For custom model configurations:

  1. Toggle Advanced Mode ON
  2. Select the Model Protocol (OpenAI/Claude/Gemini)
  3. Enter the JSON configuration:
{
"env": {
"model": "openai",
"model_id": "gpt-4o",
"api_key": "sk-xxx...",
"base_url": "https://api.openai.com/v1"
}
}

Per-Task Model Override​

When sending a task, you can override the Bot's default model:

  1. In the chat input area, click the Model selector
  2. Choose a different model
  3. Optionally enable Force Override to ensure your selection is used

⚠️ Frequently Asked Questions​

Q1: What's the difference between public and personal models?​

TypeDescriptionVisibility
PublicSystem-provided modelsAll users
PersonalYour custom configurationsOnly you

Personal models take priority when names conflict.

Q2: How do I use a proxy service?​

Set the Base URL field to your proxy endpoint:

OpenRouter: https://openrouter.ai/api/v1
Custom Proxy: https://your-proxy.example.com

Q3: Why can't I see my model in the Bot dropdown?​

Check:

  1. Model status is "Available"
  2. Model type matches the executor (e.g., Anthropic for ClaudeCode)
  3. Model is an LLM type (not Embedding/Rerank)

Q4: How do I control costs?​

Strategy 1: Use appropriate models

  • Simple tasks β†’ Claude Haiku / GPT-3.5
  • Complex tasks β†’ Claude Sonnet / GPT-4o

Strategy 2: Set usage limits

  • Configure limits in your API provider's console
  • Monitor usage regularly

Q5: Can I use the same API key for multiple models?​

Yes! You can create multiple model configurations with the same API key but different model IDs.


Next Steps​

Reference​


πŸ’¬ Get Help​

Need assistance?

  • πŸ“– Check FAQ
  • πŸ› Submit GitHub Issue
  • πŸ’¬ Join community discussions

Configure your models and power up your AI agents! πŸš€