review: sync the note this supersedes, gate the schema paths, export the modality type

The declared-provider-catalog note still recorded modalities as closed
because "nothing reads them: context.ts keeps only text blocks" — the
same reasoning this change disproves. Rewrite that fact in place, keep
pricing closed for its own still-current reason, and cross-link both
directions.

The new resolver cases never crossed the config schema, so neither
acceptance path this change adds had an executable gate: config.spec.ts
now refuses an unknown modality at both levels, pins the empty route
list to the namespace validator the settings seam actually runs, and
pins the `[]` materialization the inheritance rule depends on. A
catalog.spec.ts case re-asserts every rung through a written settings
section and `ctx.llm`, which is what the note's Testing section claimed.

Also export PiAiModality from the package entry — it types two public
config fields and consumers could not name it — record the unverified
declaration as a Known Limitation, and stop sharing one fallback array
across a route's models.
This commit is contained in:
Yichen Jiang
2026-08-12 15:49:23 +08:00
parent 94289d057e
commit 50edee2dab
14 changed files with 109 additions and 35 deletions
+1
View File
@@ -71,6 +71,7 @@ export type { PiAiAdapterOptions } from './adapter.ts'
export { Config } from './config.ts'
export type {
PiAiCompatProfile,
PiAiModality,
PiAiModelOverride,
PiAiModelProfile,
PiAiProviderProfile,