Repository navigation
DeerFlow 2.x: a generic OpenAI-compatible model entry in config.yaml (ChatOpenAI + base_url), with context_window, retries and capability flags explained #8044
Closed
apigoto
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I work on the APIGOTO team. APIGOTO is an independent OpenAI-compatible gateway, not affiliated with OpenAI, Anthropic, Google or ByteDance.
config.example.yamlalready has entries for several OpenAI-compatible providers. This is the generic version, for a gateway or any other/v1/chat/completionsendpoint, with notes on the fields that matter. Based onconfig.example.yamland the README onmain(v2.1.0).1. Get the model ID
curl https://api.china-aiapi.com/v1/models -H "Authorization: Bearer $APIGOTO_API_KEY"2. Put the key in
.env(the setup wizard writes keys there too)3. Add a model entry to
config.yamlIf you used the wizard you have a minimal
config.yaml. Usemake configif you want the full template.What each field does:
use: langchain_openai:ChatOpenAIis the same class the template uses for llama.cpp and other OpenAI-compatible servers. The Ollama-specific advice in the template (nativeChatOllama) doesn't apply to a hosted gateway.api_key: $APIGOTO_API_KEY: env vars work in any field, so the key never sits in the YAML.max_tokensis the per-call output cap, not the context size.context_windowis the total prompt plus completion capacity. The template explains that third-party OpenAI-compatible models have no built-in profile, so without it the "% context used" indicator doesn't render and fraction-based summarization triggers are dropped with a warning. Set it only to a value you've verified for that model. Leaving it unset is safer than guessing.max_retries: the template examples use 2. If your gateway already retries upstream errors, 1 avoids stacking retries during long agent runs.supports_vision: onlytrueif the model behindMODEL_IDaccepts images on that endpoint. It enables theview_imagetool.supports_thinking,supports_reasoning_effort, or areasoning:block) depend on what the specific backend accepts. Leave them out until a plain entry works.4. Restart and pick the model in the UI
The agent relies on tool calling, so choose a model that supports tools on that endpoint.
Troubleshooting
401:$APIGOTO_API_KEYnot in the.envthat the launcher reads (the README describes checkout.envvsbackend/.envprecedence).404:/v1missing or doubled inbase_url.model:must match/modelsexactly.name:is only DeerFlow's internal label.MODEL_ID.request_timeout: 600times retries. Lower both while debugging.On the gateway side: one base URL for several model families, automatic failover on upstream errors (at most 3 retries per request on another route), a per-request log, pay-as-you-go, BYOK: www.china-aiapi.com
Do you set
context_windowfor third-party models, or leave the indicator off?All reactions