Use DaoXE in gptme

gptme is an open-source agent in your terminal: shell, browser and editor tools in a local loop. Its named [[providers]] entries accept any OpenAI-compatible base URL — DaoXE is one block in config.toml.

Updated 2026-09-15

gptme runs an agent loop in your terminal — it writes code, uses the shell, browses the web. Custom endpoints come through named [[providers]] entries in ~/.config/gptme/config.toml, or the local/ prefix with OPENAI_BASE_URL; either shape fits DaoXE (cheapest APIs guide).

Why route gptme through DaoXE#

  • A real tool loop. gptme executes shell commands and applies edits in your workspace — DaoXE models that truly do function calling drive it end to end.
  • Keys stay out of the config file. api_key_env points at an environment variable name, so the secret itself never lands in config.toml.
  • Per-provider defaults. A default_model per provider means -m daoxe alone is a valid selection once the block exists.

Set it up in gptme#

  1. Declare the provider. In ~/.config/gptme/config.toml add [[providers]] with name = "daoxe", base_url = "https://daoxe.com/v1" (the docs' custom-provider examples all keep the /v1 suffix), and api_key_env = "DAOXE_API_KEY".
  2. Set the key. export DAOXE_API_KEY="sk-you…-key" — resolution order is inline api_key, then api_key_env, then ${PROVIDER_NAME}_API_KEY (here DAOXE_API_KEY would be found either way).
  3. Pick the model. gptme 'hello' -m daoxe/YOUR_EXACT_MODEL_ID — the model is provider_name/model, with the ID copied exactly from GET /v1/models.
  4. Test the tool loop. Run a real command, e.g. gptme 'list the files in the current directory' -m daoxe/YOUR_EXACT_MODEL_ID — if gptme executes a shell command and shows real filenames, tool calling works end to end.
toml
# ~/.config/gptme/config.toml — register DaoXE as a named provider
[[providers]]
name = "daoxe"
base_url = "https://daoxe.com/v1"
api_key_env = "DAOXE_API_KEY"
default_model = "YOUR_EXACT_MODEL_ID"

# then: gptme 'hello' -m daoxe/YOUR_EXACT_MODEL_ID

Caveats worth knowing

Streaming is unconditional: the docs state the transport sends stream=True regardless of metadata — an endpoint that rejects streaming will fail here; DaoXE's OpenAI-compatible path accepts streamed chat completions. Model IDs are provider-prefixed: the docs call the bare-name form a pitfall — daoxe/YOUR_EXACT_MODEL_ID, never the bare ID; a name gptme doesn't recognize warns "unknown model" but still works. The local/ prefix is env-based: OPENAI_BASE_URL + OPENAI_API_KEY also work, but those variables are shared with gptme's built-in openai provider — a named block is the cleaner isolation. Token counting may phone home: gptme fetches the OpenAI cl100k_base tokenizer and can time out offline; PyPI releases lack the character-estimate fallback, so pre-cache with tiktoken if you work airgapped. More clients: client setup notes.

Verify you actually get the model#

Prove the endpoint works before blaming the client — if this fails, no setting will fix it:

bash
export DAOXE_API_KEY="your_api_key"

# List the exact model IDs your account can call
curl --fail-with-body --show-error --silent \
  https://daoxe.com/v1/models \
  -H "Authorization: Bearer ${DAOXE_API_KEY}"

Prove the endpoint outside the agent, then diff a hard prompt against the official API at temperature 0:

bash
curl --fail-with-body --show-error --silent \
  https://daoxe.com/v1/chat/completions \
  -H "Authorization: Bearer ${DAOXE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_EXACT_MODEL_ID",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

Verify us — don't trust us

Point the open benchmark at DaoXE and at the official API and compare at temperature 0. Then learn to detect model swapping so a cheaper endpoint can't quietly swap you to a smaller model.

Frequently asked questions#

Can gptme use DaoXE?

Yes — a [[providers]] block with base_url = "https://daoxe.com/v1" and api_key_env = "DAOXE_API_KEY", then -m daoxe/YOUR_EXACT_MODEL_ID.

Do I need OPENAI_BASE_URL?

No for the named block — that's the local/ prefix path (OPENAI_BASE_URL + OPENAI_API_KEY). The [[providers]] entry keeps base URL and key scoped to the daoxe provider.

Why does tool calling loop or fail?

gptme's docs attribute tool-loop failures to models not following its tool protocol — pick a model that really does function calling, or try --tool-format xml. Run a command-listing test to confirm the loop executes.

What does it cost?

Per-model, account-scoped — live pricing; top-up is a flat 1 RMB = $1 of credit on every payment method.

Try DaoXE — and benchmark it yourself

One key for GPT, Claude, Gemini, DeepSeek and more. Point the open benchmark at us and compare — don't take our word for it.