Guides
Coding agents: Codex, OpenCode, Pi and Claude Code
Point your coding agent at Valefront and it uses the models Valefront sells, paid from your credit. Each setup below was run against Valefront before publishing.
1. Your key
Create a key on API keys and keep it in an environment variable:
export VALEFRONT_API_KEY='ll_your_key'
Pick a model id from models and pricing (for example deepseek-v4-flash-ga-260731).
2. Codex
Add a Valefront provider to ~/.codex/config.toml. Codex talks to Valefront's /v1/responses endpoint:
model = "deepseek-v4-flash-ga-260731" model_provider = "valefront" [model_providers.valefront] name = "Valefront" base_url = "https://llm.valefront.com/v1" env_key = "VALEFRONT_API_KEY" wire_api = "responses"
Then run codex as usual.
3. OpenCode
Add Valefront to opencode.json in your project (or ~/.config/opencode/opencode.json for every project):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"valefront": {
"npm": "@ai-sdk/openai-compatible",
"name": "Valefront",
"options": {
"baseURL": "https://llm.valefront.com/v1",
"apiKey": "{env:VALEFRONT_API_KEY}"
},
"models": {
"deepseek-v4-flash-ga-260731": { "name": "DeepSeek V4 Flash" }
}
}
}
}
Pick it with /models, or run opencode run -m valefront/deepseek-v4-flash-ga-260731 "…".
4. Pi
Add Valefront to ~/.pi/agent/models.json:
{
"providers": {
"valefront": {
"baseUrl": "https://llm.valefront.com/v1",
"api": "openai-completions",
"apiKey": "$VALEFRONT_API_KEY",
"models": [
{ "id": "deepseek-v4-flash-ga-260731" }
]
}
}
}
Then pi --provider valefront --model deepseek-v4-flash-ga-260731, or choose it with /model.
5. Claude Code
Claude Code talks to Valefront's Anthropic-compatible API. Point it at Valefront and name a model Valefront sells (Valefront doesn't sell Claude models; with your own Anthropic key under Your providers, you can name Claude models too):
export ANTHROPIC_BASE_URL=https://llm.valefront.com export ANTHROPIC_AUTH_TOKEN="$VALEFRONT_API_KEY" export ANTHROPIC_MODEL=deepseek-v4-flash-ga-260731 export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash-ga-260731 claude
Claude Code says it doesn't recognize the model and assumes a 200k-token context window; that's expected.
Good to know
- Add more model ids the same way; each is billed at its own price (models and pricing).
- Your own providers (dashboard, Your providers) work too: list their model ids.
- Tested: Codex CLI on November 6, 2026; OpenCode 1.19.5, Pi 1.5.0 and Claude Code 2.1.231 on November 7, 2026.