list_ai_provider_models
Lists model IDs available from an OpenAI-compatible provider using a stored secret reference, so you can choose a model for routing without exposing the API key.
Instructions
List the model ids an OpenAI-compatible provider offers (submitter or admin).
The daemon calls ``GET {base_url}/models`` with the referenced shared
key, so you can pick a model for ``set_ai_route`` while the key stays on
the machine. Returns ``{base_url_host, models}`` (sorted ids only).
Read-only despite the POST underneath (no idempotency key).
Refusals: 422 ``ai_gateway.base_url_invalid`` / ``ai_gateway.secret_ref_invalid``,
503 ``secret_missing``, 502 ``ai_gateway.provider_unreachable`` /
``ai_gateway.provider_error`` (the HTTP status, never the provider's text).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_url | Yes | OpenAI-compatible base URL, usually ending in ``/v1``; https to a public host, or http to loopback or the models bridge. | |
| api_key_ref | Yes | A ``${secrets.shared.KEY}`` reference to the provider key, set beforehand with ``set_secret`` on scope ``shared``. Never the key itself. |