llm_code
Route coding tasks to the appropriate AI model based on complexity. Generate code, refactor projects, and design algorithms with automatic model selection for simple, moderate, or complex programming needs.
Instructions
Coding task — routes to the best coding model.
Best for: code generation, refactoring suggestions, algorithm design.
Args:
prompt: The coding task or question.
complexity: Task complexity — "simple", "moderate", or "complex". Drives model
selection: simple questions use Haiku/Flash, actual implementation tasks use
Sonnet/GPT-4o, large refactors or architecture work use Opus/o3.
system_prompt: Optional system instructions (language, framework, style).
max_tokens: Maximum output tokens.
context: Optional conversation context to help the model understand the broader task.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| complexity | No | ||
| system_prompt | No | ||
| max_tokens | No | ||
| context | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |