Best Model for This
Costs assume ~1K tokens input + ~500 tokens output per step, at today’s published prices.
qwen-3-coder and minimax-m2.5 are in the free tier; kimi-k2.6 needs a top-up first.
Quick Start
Tips & Best Practices
- Set
temperature=0— deterministic code generation reduces syntax errors and off-script behavior. - Include file context in system prompt — paste relevant file contents so the model knows your codebase structure.
- Most active models support tool calling — a few (the
sonarsearch models, for example) do not. Checksupports_toolsin/v1/modelsbefore switching model. - Limit execution environment — sandbox
run_pythonwith a timeout and restricted imports for production agents.
Cost Estimate
Costs scale with context size — long files passed to the model increase input tokens significantly.
Next Steps
- Tool Calling — complete function calling reference
- Agent Setup — connect Cline, Roo Code, and other agents
- Model Aliases — use
codeoragentas shorthand model IDs