Guide · Updated June 2026

The best LLM for smolagents

smolagents takes a simple idea — let the agent think in code, run it, and iterate — and that loop is where reliability shows. A CodeAgent writes a snippet, executes it, reads the result, and goes again, often many times per task. One provider rate-limit or empty tool turn mid-loop and the run halts. CodeBurst gives smolagents an OpenAI-compatible model that fails over across providers and repairs empty tool turns, so the agent keeps iterating to a solution.

Code-and-iterate means many calls

The whole point of a code agent is the loop: act, observe, refine. Each pass is a model call, so even a "small" agent can make a lot of them on a real task — and call count is what drives the odds of hitting a provider's rate limit or an empty tool-synthesis turn that quietly stalls the run.

What CodeBurst adds

FailureCodeBurst
Provider rate-limits mid-loopReroutes to a healthy provider in the same request; the step completes.
Empty tool-synthesis turncodeburst-agent retries with a corrected format.
A hard step needs more reliabilityPoint that model at codeburst-swarm for a multi-model vote.

Configure the model

smolagents calls any OpenAI-compatible endpoint via OpenAIServerModel:

import os
from smolagents import OpenAIServerModel, CodeAgent

model = OpenAIServerModel(
    model_id="codeburst-agent",
    api_base="https://codeburst.ai/api/v1",
    api_key=os.environ["CODEBURST_API_KEY"],
)

agent = CodeAgent(tools=[...], model=model)
agent.run("...")

Your tools and agent logic stay the same — the model endpoint just stops depending on one provider being up for the whole loop.

Get started

Get an API key Best LLM for AI agents →

FAQ

How do I use a custom model with smolagents?
OpenAIServerModel(model_id="codeburst-agent", api_base="https://codeburst.ai/api/v1", api_key=...).

Why does a run stall?
The code loop makes many calls; CodeBurst fails over and repairs empty tool turns so it finishes.

Does tool calling work?
Yes — codeburst-agent handles tools with tool-call repair.