Repository navigation
feat(ai): consume optional deployment model catalogs - #3056
Conversation
🎩 PreviewA preview build has been created at: |
|
Companion generic Tangent runtime/picker support: TangleML/tangent-shell#196. Deployment manifests and endpoint wiring are intentionally outside these public repositories. |
d57a44f to
59b8bfa
Compare
camielvs
left a comment
There was a problem hiding this comment.
🤖 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.subagentanddefaults.embeddingare validated by Shopify/oasis-backend#941 and TangleML/tangent-shell#196, but nothing in any of the four PRs consumes them;AI_CONFIG.embeddingModelhere is still hardcoded. Raised in detail on the backend PR. - Both catalog validators require a
thinkingLevelMap.maxkey, butTHINKING_LEVELSfrom@tangent/shared/contractsstops atxhigh, so themaxkey is never read here (getStartingSessionThinkingDepthiteratesTHINKING_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.
b227499 to
67c5ce9
Compare
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>
67c5ce9 to
6cdfec4
Compare
Summary
Validation
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.