Contents
To run OpenHands on SolCard Inference, open Settings > LLM, turn on Advanced, and set Custom Model to openai/solcard-inference-fast, Base URL to https://api.solcardinference.ai/v1 and API Key to your sk-si- key. That’s the setup OpenHands’ docs give for any OpenAI-compatible proxy, because OpenHands routes those through LiteLLM. Everything about OpenHands below comes from its own docs; we haven’t run it ourselves.
What you need
- A SolCard Inference API key. Make one on the dashboard’s API keys page. Keys start with
sk-si-and are shown once. - Some balance or a plan. One prepaid USD balance covers every key and model; see how billing works.
- Agent Canvas, OpenHands’ local app. The install page asks for Node.js 24 or later and
uvfor the npm route, or Docker with the daemon running.
npx @openhands/agent-canvas
It starts on http://localhost:8000. The same page says to “Treat agents and ACP processes as untrusted: they can run shell commands” and to “use a container, sandbox, or VM for a tighter boundary.” The npm route runs the agent as your user, so the Docker command on that page is the safer choice for real repos.
The settings
Three fields under Advanced, and the model name keeps its openai/ prefix:
| Field | Value |
|---|---|
| Custom Model | openai/solcard-inference-fast |
| Base URL | https://api.solcardinference.ai/v1 |
| API Key | sk-si-... |
The local LLMs page explains the rule behind the model field: “the Custom Model string must match an id returned by GET /v1/models after the openai/ prefix.” Our ids are the full solcard-inference-... names, so openai/fast or openai/solcard-fast won’t match.
Keep /v1 on the Base URL. Our quickstart gives https://api.solcardinference.ai/v1 for OpenAI-style clients. Add nothing after it.
One profile per model
Agent Canvas saves model settings as LLM profiles, so make one for each model you want to switch to. The profiles page has two pieces that fit our API:
- Provider Connections “store a provider, API key, and optional base URL once.” Make one connection with our key and Base URL, then link each profile to it. The page says a linked profile hides its own key and base URL fields, and a key change applies to every linked profile. Connections only exist on the local backend.
- Profiles then differ only in Custom Model:
openai/solcard-inference-fast,openai/solcard-inference-largeandopenai/solcard-inference-base.
Switch mid-conversation with /model. Per the same page, /model lists your saved profiles and /model <profile-name> switches to one. The switch keeps history, workspace and task state, and “applies to future model requests only.”
Which profile to start on: OpenHands’ LLM page says it “requires a powerful model to work” and to “Use the strongest model you can afford for long-running or high-stakes tasks.” That points at Large, which always reasons, for multi-step work, and Fast for quick fixes. Fast, Large or Base compares the three.
Check it works
Saving a profile is the first test. The profiles page says saving “validates the configuration against the backend first, so a rejected key or unavailable model blocks the save.” If it saves, start a conversation with something small, such as asking what the open workspace contains.
If the save fails, test the key without OpenHands:
curl https://api.solcardinference.ai/v1/models \
-H "Authorization: Bearer sk-si-..."
The list should name solcard-inference-fast, -large and -base. If it does, the problem is in the profile, most often the model string.
What a long run costs
An agent run is many requests, and each one resends the conversation so far. Say a task takes 30 steps, each sending about 20,000 tokens and getting 500 back. That’s about $0.79 on Fast and about $2.34 on Large plus its reasoning, before any cached-input discount. Steps that resend the same history bill most of it as cached input, at a tenth of the input rate, so the real figure is usually lower.
OpenHands’ LLM page also warns: “Most of these LLMs cost money, so be sure to set spending limits and monitor usage.” How billing works has the prices and plans.
Troubleshooting
These codes come from our errors page; OpenHands may word them differently.
- 401
invalid_api_key: the key is missing, revoked or unknown. If the profile is linked to a connection, fix the key there. - 400
model_not_found: the id afteropenai/isn’t one of ours. - 400
unsupported_content: an image reached the model. Ours take text only, so don’t paste screenshots into the chat. OpenHands’ LLM page lists anLLM_DISABLE_VISIONoption. - 402
insufficient_balance: top up, then retry. - 429
rate_limitedorplan_limit_reached: too many requests a minute, or the weekly plan limit is used up. The LLM page says OpenHands retries 429s, four times by default (LLM_NUM_RETRIES), so a short burst usually clears itself. A plan limit clears when it resets or after you top up. - 504
upstream_timeout: one generation ran past 9 minutes. Ask for smaller steps.
Every model writes at most 32,768 tokens per request, so very large single-file rewrites need splitting. The LLM page’s own advice for “malformed JSON errors” or poor tool use is “try a stronger model, increase the context window, or switch to a frontier cloud model for that task”: on our side, that means switching the profile to Large.
The old CLI
The CLI reference says “The OpenHands CLI is no longer actively maintained.” If you still run it, it ignores LLM_MODEL and LLM_BASE_URL unless you pass --override-with-envs, and “Changes made with --override-with-envs are not persisted.”
export LLM_MODEL="openai/solcard-inference-fast"
export LLM_BASE_URL="https://api.solcardinference.ai/v1"
export LLM_API_KEY="sk-si-..."
openhands --override-with-envs
FAQ
Is there a SolCard Inference provider in OpenHands?
No. The openai/ model prefix with our Base URL is the whole integration, the same route LiteLLM and Aider use.
Does /model start a new conversation?
No. Per the profiles page, it keeps history and workspace and changes the model for the next requests.
Are my prompts or code stored?
Not by us: prompts and responses are never logged or stored. OpenHands keeps its own settings and conversations on your machine, in ~/.openhands for npm and npx and in the openhands-data volume for Docker, per its install page. See keeps nothing for our side.
Can I use OpenHands Cloud instead? This guide covers the local Agent Canvas. The profiles page says Provider Connections are hidden on Cloud, so check Cloud’s own settings before relying on these steps there.