Skip to content

feat(ai): consume optional deployment model catalogs - #3056

Merged
camielvs merged 3 commits into
masterfrom
cvs/configurable-model-catalog
Nov 19, 2026
Merged

camielvs merged 3 commits into
masterfrom
cvs/configurable-model-catalog

Conversation

@camielvs

@camielvs camielvs commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator
image image

Summary

  • Support an optional host-configured authenticated catalog endpoint; standalone installs do not fetch it.
  • Read ordered browser-capable choices, explicit defaults, stale-ID replacements, API protocols and runtime handoff IDs from the catalog.
  • Map reasoning using declared Pi capabilities rather than inferring a provider from the model name.
  • Keep proxy configuration unavailable until the configured catalog loads; preserve standalone/custom-provider configuration.
  • No deployment-specific model lists or credentials added to this public repo.

Validation

  • 75 focused tests pass, including catalog loading, agent-only filtering and explicit session handoff.
  • Typecheck and changed-file ESLint pass.

Rollout

Requires a schema-version-1 catalog and the companion generic Tangent Shell catalog support. Deployment source/configuration lives outside this repo. Existing defaults remain unchanged when no catalog endpoint is configured. Live inference and integrated browser testing remain for deployment validation.

@camielvs
camielvs requested a review from a team as a code owner November 17, 2026 23:46
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cvs/configurable-model-catalog/6cdfec4

@camielvs

Copy link
Copy Markdown
Collaborator Author

Companion generic Tangent runtime/picker support: TangleML/tangent-shell#196. Deployment manifests and endpoint wiring are intentionally outside these public repositories.

@camielvs
camielvs force-pushed the cvs/configurable-model-catalog branch from d57a44f to 59b8bfa Compare November 18, 2026 18:03

@camielvs camielvs left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-generated code review comment.

8 findings, inline below (2 High, 3 Medium, 3 Low).

Cross-repo notes:

  • The catalog's defaults.orchestrator, defaults.subagent and defaults.embedding are validated by Shopify/oasis-backend#941 and TangleML/tangent-shell#196, but nothing in any of the four PRs consumes them; AI_CONFIG.embeddingModel here is still hardcoded. Raised in detail on the backend PR.
  • Both catalog validators require a thinkingLevelMap.max key, but THINKING_LEVELS from @tangent/shared/contracts stops at xhigh, so the max key is never read here (getStartingSessionThinkingDepth iterates THINKING_LEVELS) or in the Tangent picker. Raised on the backend PR.

What's good: the standalone path is untouched and covered by a test that asserts no fetch happens; agent-only models are filtered before validation so a Chat Completions entry can never reach browser execution; an invalid or failed catalog leaves models unset instead of installing a partial list; useAiProviderSettings.ts is already in react-compiler.config.js and the new modelCatalog.ts is plain functions, so no registration change is needed.

Comment thread src/config/modelCatalog.ts Resolved
Comment thread src/hooks/useAiProviderSettings.ts Resolved
Comment thread src/config/aiConfig.ts Resolved
Comment thread src/hooks/useAiProviderSettings.ts Resolved
Comment thread src/config/modelCatalog.ts Resolved
Comment thread src/config/modelCatalog.ts Resolved
@camielvs
camielvs force-pushed the cvs/configurable-model-catalog branch from b227499 to 67c5ce9 Compare November 18, 2026 20:29
camielvs and others added 3 commits November 18, 2026 15:00
Replace the `as` assertions in the catalog loader, the host-config reader
and the session handoff with type guards, and move `AiModelOption` to the
provider types so `modelCapabilities` can carry catalog fields without a
cast.

Read catalog replacements through the sanitized host config instead of the
raw window object, name the catalog event once, drop the unused abort
signal, and hand off the nearest mapped thinking level when the preferred
effort has no Pi level.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Every consumer of useAiProviderSettings used to start its own catalog fetch
and keep its own ready flag, so a page with a dozen AI surfaces fanned out
into a dozen requests and re-announced the catalog each time. The catalog
module now owns one in-flight load and a loading/ready/failed status that
the hook reads through its existing external store subscription.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@camielvs
camielvs force-pushed the cvs/configurable-model-catalog branch from 67c5ce9 to 6cdfec4 Compare November 18, 2026 22:01
@camielvs
camielvs merged commit d866020 into master Nov 19, 2026
18 checks passed
@camielvs
camielvs deleted the cvs/configurable-model-catalog branch November 19, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants