feat(llm-pi-ai): modelOverrides reshapes catalog models without replacing the catalog

A route's modelOverrides dict customizes individual installed-catalog
models — key = catalog model id, value = the same fields a models entry
takes — while the rest of the catalog keeps serving, which a models list
cannot express because declaring one replaces the served set. An
override becomes the catalog entry's configuration and resolves through
the existing entry path, so capacities, reasoningEfforts, compat, and
request-default semantics are identical to a models entry's. Unlike
Pi's config layer, which ignores unknown ids, every override that lands
nowhere is refused at the write that produced it: beside a models list,
on a hand-declared route, naming a model the catalog does not describe,
or smuggling an id through the schema's unknown-key tolerance.
This commit is contained in:
Yichen Jiang
2026-08-08 00:57:41 +08:00
parent 0490f8bb06
commit 756304322a
7 changed files with 164 additions and 7 deletions
+1
View File
@@ -70,6 +70,7 @@ export type { PiAiAdapterOptions } from './adapter.ts'
export { Config } from './config.ts'
export type {
PiAiCompatProfile,
PiAiModelOverride,
PiAiModelProfile,
PiAiProviderProfile,
PiAiReasoningEfforts,