deepseek-harness/docs
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
..
cookbook docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
cordis-catalog feat(llm): interrogate a draft provider endpoint for its models 2026-08-05 19:50:11 +08:00
cordis-tutorial docs(i18n): proofread active Chinese documentation 2026-08-04 17:36:14 +08:00
core-data-structures fix(llm): let a catalog route keep the auth its provider actually declares 2026-08-05 18:54:47 +08:00
i18n docs: apply hierarchy across the corpus 2026-08-05 16:13:28 +08:00
postmortem docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
user docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
agent-lifecycle.md refactor(agent): return request retry action 2026-07-27 21:17:49 +08:00
AGENTS.md docs: define hierarchy and document forms 2026-08-05 16:13:27 +08:00
architecture.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
architecture.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
architecture.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
capability-seams.md Merge remote-tracking branch 'origin/master' into feat/pwsh-tool 2026-08-04 17:54:45 +08:00
config-catalog.md fix(llm): size unknown models and refuse a section that cannot be served 2026-08-05 18:54:23 +08:00
cordis-paper.pdf docs: add cordis paper 2026-07-31 15:54:36 +08:00
cordis-primer.i18n.yaml docs(i18n): proofread active Chinese documentation 2026-08-04 17:36:14 +08:00
cordis-primer.md Merge remote-tracking branch 'origin/master' into worktree/pr343-retarget-latest-master 2026-07-23 13:40:29 +08:00
cordis-primer.zh.md docs(i18n): proofread active Chinese documentation 2026-08-04 17:36:14 +08:00
defensive-patterns.i18n.yaml docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
defensive-patterns.md docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
defensive-patterns.zh.md docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
development.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
development.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
development.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
event-producer-consumer.md feat(llm): interrogate a draft provider endpoint for its models 2026-08-05 19:50:11 +08:00
glossary.i18n.yaml docs(i18n): address proofreading review findings 2026-08-04 18:42:13 +08:00
glossary.md docs: align Goal Round step cardinality 2026-07-24 12:10:40 +08:00
glossary.zh.md docs(i18n): address proofreading review findings 2026-08-04 18:42:13 +08:00
graph-atlas.md cleanup: remove TUI package and legacy dsh entrypoints 2026-08-04 13:20:28 +08:00
module-graph.md Merge remote-tracking branch 'origin/master' into feat/pwsh-tool 2026-08-04 17:54:45 +08:00
persistence-catalog.md chore(docs): refresh the descriptor catalog pointer 2026-08-02 20:34:43 +08:00
testing.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
testing.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
testing.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
tool-catalog.md docs(pwsh): scope the encoding claim, document the PATH probe and preamble limitation, and fix catalog requires lists 2026-08-02 19:37:45 +08:00
tool-execution-pipeline.md Merge remote-tracking branch 'origin/master' into feat/send-unify 2026-07-23 22:41:45 +08:00
web-styling.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
web-styling.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
web-styling.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00