Yichen Jiang
ecee93ec26
feat(llm): interrogate a draft provider endpoint for its models
...
Once a pi-ai route became a declaration rather than a catalog lookup,
adding an OpenAI-compatible gateway meant knowing its model ids up
front. Most such endpoints publish that list at `GET /models`, but no
seam operation could ask: every one is keyed by a registered provider
route, and the provider being added has no route, no stored profile,
and no stored credential — the endpoint and key are values in a form.
Interrogation is therefore keyed by settings namespace, which a
configuration surface already holds from the configurable-provider
directory. `registerModelDiscovery` offers it per namespace,
`discoverModels` asks, and the request carries the draft itself. The
reply is candidates, not a catalog: every field but the id is optional
because most listings disclose nothing else, and adopting one is a
settings write like any other. Nothing here reads or writes settings or
credentials, so `settings.yaml` still decides what a route serves.
`llm.discoverModels` carries the same draft over the wire. Its apiKey is
the third and last payload a secret may ride, and it is never stored,
logged, or echoed; every refusal folds into `model-discovery-failed`,
naming the endpoint asked but never the credential offered.
The pi-ai side is a plain GET for OpenAI-compatible protocols only —
their listing shape is the one gateways, self-hosted servers, and the
official endpoints agree on. Others say so, sending the user to
hand-entry rather than reporting a guessed shape as an empty provider.
The reply is read under a four-megabyte ceiling held on the bytes
actually received, because the endpoint is a URL the user typed.
2026-08-05 19:50:11 +08:00
..
2026-08-04 17:36:14 +08:00
2026-07-26 23:06:00 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-28 00:00:51 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-23 19:48:00 +08:00
2026-07-23 19:33:30 +08:00
2026-07-23 19:48:00 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 18:42:13 +08:00
2026-07-26 22:45:33 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 20:54:42 +08:00
2026-07-28 22:16:43 +08:00
2026-08-04 20:54:42 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 23:06:00 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-24 23:43:10 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-23 00:10:53 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-25 15:11:17 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-24 23:43:10 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-02 12:51:09 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 20:54:42 +08:00
2026-07-31 03:10:48 -07:00
2026-08-04 20:54:42 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 23:06:00 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 04:14:51 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 18:42:13 +08:00
2026-07-26 23:06:00 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 17:36:14 +08:00
2026-07-24 23:43:10 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-28 00:00:51 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-05 10:57:53 +08:00
2026-07-22 23:07:14 +08:00
2026-08-05 10:57:53 +08:00
2026-08-04 17:36:14 +08:00
2026-07-22 23:07:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 02:33:29 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 12:43:59 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 02:33:29 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-23 19:33:30 +08:00
2026-08-04 17:36:14 +08:00
2026-08-02 20:09:05 +08:00
2026-08-02 20:09:05 +08:00
2026-08-02 20:09:05 +08:00
2026-08-05 10:57:53 +08:00
2026-07-26 02:33:29 +08:00
2026-08-05 10:57:53 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 21:17:49 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 18:42:13 +08:00
2026-07-29 22:56:14 +08:00
2026-08-04 18:42:13 +08:00
2026-08-02 12:51:09 +08:00
2026-08-02 12:51:09 +08:00
2026-08-02 12:51:09 +08:00
2026-08-04 20:54:42 +08:00
2026-07-24 01:40:25 +08:00
2026-08-04 20:54:42 +08:00
2026-08-04 18:42:13 +08:00
2026-07-26 14:00:37 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 18:42:13 +08:00
2026-07-26 13:13:53 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 17:36:14 +08:00
2026-07-24 01:40:25 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-21 21:11:32 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 20:51:32 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-23 03:15:15 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 16:07:35 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 16:07:35 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 17:36:14 +08:00
2026-07-21 20:15:09 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-03 22:04:53 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 11:58:38 +08:00
2026-08-04 11:58:38 +08:00
2026-08-04 11:58:38 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 21:20:06 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 15:49:09 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-25 16:43:07 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 18:42:13 +08:00
2026-07-28 12:09:48 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 01:58:51 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 14:36:31 +08:00
2026-08-04 14:36:31 +08:00
2026-08-04 14:36:31 +08:00
2026-08-04 18:42:13 +08:00
2026-07-31 20:47:55 +08:00
2026-08-04 18:42:13 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 13:42:02 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-24 21:50:11 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-28 15:45:53 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-31 16:49:55 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-31 03:20:20 +08:00
2026-08-04 17:36:14 +08:00
2026-08-05 12:29:03 +08:00
2026-08-05 12:21:09 +08:00
2026-08-05 12:21:09 +08:00
2026-08-04 17:36:14 +08:00
2026-07-28 12:09:48 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-31 19:13:22 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 03:54:33 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-28 02:33:14 -07:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 04:14:51 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-26 12:17:45 +08:00
2026-08-04 17:36:14 +08:00
2026-07-29 23:45:42 +08:00
2026-07-29 23:45:42 +08:00
2026-07-29 23:45:42 +08:00
2026-08-04 17:36:14 +08:00
2026-07-27 03:52:41 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 20:54:42 +08:00
2026-07-28 17:02:39 +08:00
2026-08-04 20:54:42 +08:00
2026-08-03 13:45:30 +08:00
2026-08-03 13:45:30 +08:00
2026-08-03 13:45:30 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 10:11:38 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 01:14:25 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-28 13:55:59 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 14:09:04 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-29 13:15:24 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 17:22:15 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-31 01:30:29 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 21:49:58 +08:00
2026-07-30 21:49:58 +08:00
2026-07-30 21:49:58 +08:00
2026-07-31 17:39:51 +08:00
2026-07-31 17:39:51 +08:00
2026-07-31 17:39:51 +08:00
2026-07-30 18:07:35 +08:00
2026-07-30 18:07:35 +08:00
2026-07-30 18:07:35 +08:00
2026-08-04 17:36:14 +08:00
2026-07-30 19:24:21 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-07-31 01:30:29 +08:00
2026-08-04 17:36:14 +08:00
2026-08-02 01:25:02 +08:00
2026-08-02 01:25:02 +08:00
2026-08-02 01:25:02 +08:00
2026-08-02 12:51:10 +08:00
2026-08-02 12:51:10 +08:00
2026-08-02 12:51:10 +08:00
2026-08-04 17:36:14 +08:00
2026-07-31 11:00:07 +08:00
2026-08-04 17:36:14 +08:00
2026-08-02 01:29:04 +08:00
2026-08-02 01:29:04 +08:00
2026-08-02 01:29:04 +08:00
2026-08-05 15:34:51 +08:00
2026-08-05 15:34:51 +08:00
2026-08-05 15:34:51 +08:00
2026-08-02 01:11:08 +08:00
2026-08-02 01:11:08 +08:00
2026-08-02 01:11:08 +08:00
2026-08-05 18:54:47 +08:00
2026-08-05 18:54:47 +08:00
2026-08-05 18:54:47 +08:00
2026-08-05 19:50:11 +08:00
2026-08-05 19:50:11 +08:00
2026-08-05 19:50:11 +08:00
2026-08-04 16:42:50 +08:00
2026-08-04 16:42:50 +08:00
2026-08-04 16:42:50 +08:00