Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MODEL ROUTE Keywords

Route LLM requests to different models based on task type, cost, or capability requirements.

Keywords

KeywordPurpose
USE MODELSelect a specific model for next request
SET MODEL ROUTINGConfigure routing strategy
GET CURRENT MODELGet active model name
LIST MODELSList available models

USE MODEL

USE MODEL "fast"
response = ASK "Quick question about the weather"

USE MODEL "quality"
response = ASK "Analyze this complex legal document"

SET MODEL ROUTING

SET MODEL ROUTING "auto"
SET MODEL ROUTING "cost"
SET MODEL ROUTING "manual"

Routing Strategies

StrategyDescription
manualExplicitly specify model per request
autoAuto-select based on task complexity
costPrefer cheaper models when possible
qualityAlways use highest quality model

GET CURRENT MODEL

model = GET CURRENT MODEL
TALK "Currently using: " + model

LIST MODELS

models = LIST MODELS
FOR EACH m IN models
    TALK m.name + " - " + m.description
NEXT

Configuration

Add to config.csv:

llm-models,default;fast;quality;code
model-routing-strategy,auto
model-default,claude-sonnet-4.5
model-fast,gemini-flash
model-quality,claude-opus-4.5
model-code,claude-sonnet-4.5

Example: Task-Based Routing

USE MODEL "code"
code_review = ASK "Review this function for bugs: " + code

USE MODEL "fast"
TALK "Here's what I found:"
TALK code_review

See Also