将较长面向用户的文本生成委托给 Upstage Solar Pro3,保留主模型用于规划和工具调用。适用于撰写说明...
Delegate long text generation to Upstage Solar Pro3 while the primary model focuses on planning, reasoning, and tool calls.
RouteModelEnv VariableDescriptionUpstage Directsolar-pro3``UPSTAGE_API_KEYDirect Upstage API call (recommended)Via OpenRouteropenrouter/upstage/solar-pro-3``OPENROUTER_API_KEYCall through OpenRouter
python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["UPSTAGE_API_KEY"],
base_url="https://api.upstage.ai/v1"
)
response = client.chat.completions.create(
model="solar-pro3",
messages=[{"role": "user", "content": "Write a detailed report..."}]
)
print(response.choices[0].message.content)
Get your key at console.upstage.ai.
Model reference: https://openrouter.ai/upstage/solar-pro-3
Check runtime/session settings to see where delegation is enabled.
Typical values:
main: direct/main sessionslack: Slack messagestelegram: Telegram messagesIf the current session is not enabled, skip delegation and respond directly.
Use a minimum output-token threshold:
Common examples:
0: delegate all responses200: delegate medium/long responses onlyIf no threshold is configured, use 200 as default.
sessions_spawn with Solar Pro3.Example spawn task pattern:
text
<context + writing instruction>
Important: Do not use any tools. Output text only. No file read/write or tool calls allowed.
Set model to:
solar-pro3 (Upstage direct — recommended)openrouter/upstage/solar-pro-3 (via OpenRouter)Use sessions_spawn and wait for auto-announced result.
Use sessions_spawn, then fetch the final assistant text and forward it through the appropriate message channel/thread.
If no final text arrives within a reasonable timeout, fall back to direct response.
<system-temp>/<timestamp>-solar.<ext> (e.g., /tmp/20260504-153022-solar.md). Pick .md for markdown content, .txt for plain prose.Delegate when above threshold and user expects substantial writing:
Keep direct response for:
Users may request:
Apply updates to persistent memory/config used by your environment.
UPSTAGE_API_KEY environment variable is configured. Get key at console.upstage.ai.https://api.upstage.ai/v1, model to solar-pro3.OPENROUTER_API_KEY).For manual setup details, see references/setup-guide.md.