Skip to content

Persist jurisdiction and discover provider models - #84

Merged
ranade-oss merged 2 commits into
mainfrom
fix/persistent-jurisdiction-provider-model-discovery
Aug 4, 2026
Merged

Persist jurisdiction and discover provider models#84
ranade-oss merged 2 commits into
mainfrom
fix/persistent-jurisdiction-provider-model-discovery

Conversation

@ranade-oss

Copy link
Copy Markdown
Owner

What changed

  • Preserve the submitted jurisdiction across the first-prompt route transition and subsequent prompts, scoped per project where applicable.
  • Discover compatible chat/text models at runtime for configured OpenAI, Anthropic, Gemini, xAI, and Moonshot credentials.
  • Keep dynamically discovered model IDs selectable through the frontend and backend validation path.
  • Add explicit GPT-5.6 Sol, Terra, and Luna choices while retaining the existing GPT-5.6 alias.
  • Expose provider/model-specific reasoning controls only where the API contract supports them.
  • Add regression coverage for selector persistence, provider discovery, API-key visibility, and hosted-runtime policy.

Root cause

The jurisdiction selection lived only in component state, so the first prompt's route transition remounted the input with the Ontario default. Model availability was based on curated arrays and partial provider discovery; dynamically returned IDs could be displayed incompletely or rejected later by frontend persistence or backend validation.

Impact

Users can continue a Federal Canada or U.S. conversation without repeatedly resetting the jurisdiction. New compatible models from an already supported provider can appear from that provider's model-list endpoint without recurring UI hardcoding. Adding an entirely new provider still requires an explicit adapter because authentication and discovery schemas differ.

Validation

  • 161/161 baseline tests
  • 19/19 backend chat and provider tests
  • Backend TypeScript build
  • Frontend TypeScript check
  • Frontend Next.js production build

The branch was rebased onto current main before these exact-head checks.

@ranade-oss
ranade-oss marked this pull request as ready for review August 4, 2026 22:00
@ranade-oss
ranade-oss merged commit 58aa0b0 into main Aug 4, 2026
6 checks passed
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