DEV Community

Seven
Seven

Posted on

Account-scoped /models is a feature: stop shipping static model lists

Disclosure and availability: DaoXE is a multi-model multi-protocol API gateway we operate. Not available in mainland China. This article is for developers in regions allowed by the service terms.

I used to put model IDs in README tables.

Then a teammate's key failed with model_not_found while mine worked.

Same base URL. Same client. Different account catalog.

This post is why I treat /v1/models as live data, not documentation.

Series

  1. Smoke test
  2. Multiprotocol
  3. Client setup
  4. curl OK, IDE fails
  5. Claude protocol
  6. models.dev + /models
  7. Agent pre-flight
  8. Env var names
  9. Base URL shape
  10. This post: account-scoped models

Two catalogs people confuse

Catalog Source Scope
Public marketing / models.dev website, provider lists “what exists in the product world”
Account /v1/models GET /v1/models with your key “what this key can call now

They overlap. They are not identical.

The failure mode

  1. Blog says model X
  2. You hardcode X in Cline / Continue / SDK
  3. Key B never had X (plan, region, entitlement, rotation)
  4. You debug “the gateway is broken”

The gateway answered correctly: that account cannot use X.

The fix workflow

export DAOXE_API_KEY="your_api_key"
export DAOXE_BASE_URL="https://daoxe.com/v1"

curl --fail-with-body --show-error --silent \
  -H "Authorization: Bearer $DAOXE_API_KEY" \
  "$DAOXE_BASE_URL/models"
Enter fullscreen mode Exit fullscreen mode

Then:

  1. Copy an exact id from the JSON
  2. Smoke one Chat Completions call with that id
  3. Paste that id into the client
  4. Re-run /models after plan changes

Design implications for apps

Anti-pattern Prefer
Ship a frozen model enum in client builds Refresh models at setup / login
Share one screenshot of models with the team Each person lists with their key
Treat models.dev as entitlement proof Treat it as discovery only
Cache model IDs forever Cache with TTL + refresh on 404/not_found

Soft CTA

Product side:

https://daoxe.com/?utm_source=devto&utm_medium=organic&utm_campaign=global_launch_models_scope

Public notes: CLIENT_SETUP.md

Comment with whether your client supports model refresh from /models. No API keys in comments.

Top comments (0)