DEV Community

Triumph
Triumph

Posted on

Why /models Is Not Enough for Agent Provider Discovery

/models is useful, but it is only inventory.

An endpoint can return a convincing list of model IDs and still leave an agent runtime guessing about the things that matter during a real task. A model being listed is not the same as that model being usable for your client, protocol path, tool loop, or context policy.

What /models actually tells you

A model-list endpoint can answer a narrow question: which identifiers does this provider expose right now?

That is valuable for discovery and configuration checks. It can catch a typo, show that a route is reachable, and tell a client which identifiers it may request.

It normally does not prove that:

  • the identifier works on the endpoint your client will call;
  • the provider accepts the request format your agent emits;
  • streaming events have the shape your runtime expects;
  • tool calls are supported or reconstructed correctly;
  • the model has the context and output limits your task needs;
  • image or other multimodal input is available on that route;
  • usage, pricing, and reset information will be returned consistently.

“Listed” is an inventory state, not a capability contract.

What an agent actually needs to know

An agent has a larger surface area than a one-shot chat request. Before selecting a route, it may need to know:

  • the provider and resolved model identifier;
  • the base URL and protocol path used by the client;
  • the authentication mode and model-discovery behavior;
  • whether streaming terminates cleanly and preserves event order;
  • whether tool calls expose usable names, IDs, and arguments;
  • whether structured output or reasoning controls are accepted for this exact model;
  • the context and output limits that apply to the request;
  • whether the route supports the required text, image, or multimodal inputs;
  • how usage is reported and how failures are classified;
  • whether the model is available now, temporarily unavailable, or gated by quota.

Those facts belong to a resolved provider/model route. They should not be inferred from a model name alone.

Why static discovery breaks in multi-provider systems

Static discovery becomes misleading when a router merges model lists from several providers into one catalog.

Two providers may expose the same model label while using different protocol paths, parameter names, context limits, tool-call formats, or usage fields. The same provider may also expose a model that is available for a basic request but not for a longer agent session.

The failure mode usually appears one layer above discovery. The catalog looks healthy, so the runtime selects the route. The first tool call, stream, long context, or retry then reveals that the catalog never described the capability the workflow depended on.

Dynamic availability makes this harder. A provider may return a model today and reject it later because of capacity, account quota, regional availability, or a temporary outage. A discovery result should therefore carry time and provider context instead of becoming a permanent promise.

A better provider-discovery checklist

I would keep model inventory separate from capability verification:

  1. Record the provider, base URL, protocol path, and exact model ID.
  2. Confirm that the model is usable through the same client path used in the application.
  3. Probe the capabilities the workflow actually needs: streaming, tools, structured output, reasoning controls, context size, and multimodal input where relevant.
  4. Capture the response shape, usage fields, request ID, and error body without logging credentials.
  5. Attach availability, quota, and rate-limit information to the attempt rather than treating it as static model metadata.
  6. Keep unsupported capabilities explicit so the request can be shaped or rejected before an agent loop starts.

The result does not need to be a huge registry. A small, time-stamped capability record is more useful than a large list that hides uncertainty.

A practical migration test

When adding a provider, use one bounded workflow rather than changing the whole catalog at once. Keep the client, prompt, tool permissions, context policy, and success criteria fixed. Run the same task through the selected provider/model path and record the resolved route, capability decisions, failures, retries, usage, and outcome.

This exposes the difference between “the provider lists this model” and “this exact workflow can use this route.” It also makes a later provider switch explainable when a model disappears, a capability is rejected, or a rate limit changes the result.

If your router only knows model names, it still has to guess at runtime behavior. That guess is where many multi-provider agent failures begin.

Disclosure: I am building Your Model. It is intended as one practical way to test selected provider and model paths through an OpenAI-compatible client before moving more traffic.

https://y-models.com/?utm_source=devto&utm_medium=article&utm_campaign=signup_acquisition_20260816&utm_content=provider_discovery

What is the first capability you verify after /models: streaming, tools, context limits, structured output, or usage reporting?

Top comments (0)