Language Models Guide
Discover Models
from glaip_sdk import Client
client = Client()
for model in client.list_language_models():
print(model["id"], model["name"], model.get("provider"))aip models listcurl -sL "$AIP_API_URL/language-models" -H "X-API-Key: $AIP_API_KEY" | jqAssign Models to Agents
1. Model Constants (Recommended)
from glaip_sdk import Agent
from glaip_sdk.models import OpenAI, DeepInfra, Anthropic, Google
# Using OpenAI models
agent = Agent(
name="analysis",
instruction="You are a precise analyst.",
model=OpenAI.GPT_5_NANO, # Resolves to "openai/gpt-5-nano"
)
# Using DeepInfra models
agent = Agent(
name="research",
instruction="You are a research assistant.",
model=DeepInfra.QWEN3_30B_A3B, # Resolves to "deepinfra/Qwen/Qwen3-30B-A3B"
)
# Using Anthropic models
agent = Agent(
name="creative",
instruction="You are a creative writer.",
model=Anthropic.CLAUDE_SONNET_4_0, # Resolves to "anthropic/claude-sonnet-4-0"
)Provider
Import
Examples
2. String Format (Direct)
Common routing issues
Symptom
Likely cause
Fix
Advanced: Custom Model Configuration
Custom DeepInfra Model with Credentials
Local vs Remote Execution
How Model Configuration Works
Execution Mode
Model Configuration
Behavior
Example: Local Execution with AIP Server Models
Example: Custom Model Not in AIP Server
Switching Between Local and Remote
Using Custom Models with AIP Server
Option 1: Local Execution (Recommended for Custom Models)
Option 2: Register Model on AIP Server
Related Documentation
最后更新于