Skip to content

OpenHands: connect to ModelFold ​

Higher credit usage on the first session is normal

Agents attach fixed tool definitions and a system prompt to every request, often tens of thousands of tokens. On the first session this content is written to the cache and billed as full input, so credit usage is higher. Later requests hit the cache and are billed at the much lower cached rate, so usage drops noticeably. This is expected behavior — you are not being overcharged. For high-volume usage, please contact support — we can offer discounts.

All coding tools · More integrations · Unsupported and limited tools

Configured from official documentation; not tested in this client. This verifies configuration availability, not every agent feature or model.

Install and prepare ​

Install the official release using the installation link in the vendor documentation. For an editor extension, use the official publisher in your editor marketplace. Create a key in ModelFold API Keys; keep it out of project files and screenshots. Where a snippet references MODELFOLD_API_KEY, set it in the environment before launching the tool:

bash
export MODELFOLD_API_KEY="YOUR_MODELFOLD_API_KEY"

Configure the provider ​

Setup location: CLI environment / --override-with-envs. Verification: Configured from official documentation; not tested in this client.

Install the OpenHands CLI using the official uv instructions. Pass --override-with-envs to replace saved settings. The openai/ prefix selects the client adapter.

bash
export LLM_API_KEY="$MODELFOLD_API_KEY"
export LLM_BASE_URL="https://modelfold.ai/v1"
export LLM_MODEL="openai/gpt-6-1-sol"
openhands --override-with-envs

For Claude use anthropic/claude-opus-5-5 with https://modelfold.ai/anthropic. Self-hosted web settings are separate from CLI settings.

For Claude, prefer the native Anthropic route. Cache savings require eligible repeated prefixes and client cache support; a custom endpoint alone does not guarantee a cache hit.

Official configuration reference.

Model and endpoint ​

FieldValue
Endpoint used by this guidehttps://modelfold.ai/v1
API model IDgpt-6-1-sol
CredentialYour ModelFold API key

The model ID must match All model IDs. Client prefixes such as openai/ select an adapter and are not part of the server model ID. Do not add /v1 or /messages twice; follow this tool's example.

Verify ​

Start a new chat, select the configured provider/model, and send: Reply with exactly OK. Do not use tools. A successful response verifies that model route only. Then check the corresponding request in ModelFold usage. A model appearing in the picker alone is not a connectivity test. Before a long coding task, try one small change in a disposable project.

Troubleshooting ​

SymptomCheck
401Use a ModelFold key, not a vendor subscription token; remove extra whitespace.
404Check the protocol, URL suffix and exact model ID.
Empty model pickerEnter the documented ID manually when supported; restart the client after changing environment variables.
Chat works, tools failSelect a tool-capable model; client agent features are not guaranteed by basic chat compatibility.
Requests still use the built-in serviceSelect your custom provider explicitly and check saved settings/environment overrides.

Prices follow the model price page. Tasks can make multiple requests. Final deductions are shown in your account; client cost estimates are not the billing record.

ModelFold — one API for all the best AI models.