Skip to content

Add AI model quick-select to app menu and injectable model config#2461

Open
Mbeaulne wants to merge 1 commit into
06-23-simplify_component_search_result_cardsfrom
06-26-ai_model_selector_config_sync
Open

Add AI model quick-select to app menu and injectable model config#2461
Mbeaulne wants to merge 1 commit into
06-23-simplify_component_search_result_cardsfrom
06-26-ai_model_selector_config_sync

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds an AI model quick-select dropdown to the app header that appears once AI provider settings are configured. The selector lets users switch between models without navigating to the settings page.

A new aiModels config module centralises the list of available model options and the default model ID. Host pages can override both by setting window.__TANGLE_AI_MODELS__ before the app loads, allowing proxy deployments to expose their own model catalogue instead of the built-in OpenAI model list.

The Agent Settings model field is also improved: the freeform text input now sits alongside a dropdown populated from the same model options list, the placeholder reflects the configured default model ID, and the field stays in sync when the stored config is updated from another control (e.g. the new header selector).

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. Open the app without any AI provider configured — confirm no model selector appears in the header.
  2. Navigate to Settings → Agent and configure an API base URL, then return to the main view — confirm the model selector now appears in the header.
  3. Use the header selector to switch models and verify the change is reflected in the Agent Settings model field.
  4. In Agent Settings, click the dropdown chevron next to the model input and confirm the list of common models appears and selecting one populates the text field.
  5. To test host-page injection, set window.__TANGLE_AI_MODELS__ = { defaultModel: "proxy-frontier", models: [{ id: "proxy-frontier", label: "Proxy frontier" }] } in the browser console before loading the page and confirm the custom model list appears in both the header selector and the settings dropdown.

Additional Comments

The window.__TANGLE_AI_MODELS__ injection point is intentionally read at call time rather than cached, so tests can set and clear it between cases without module-level side effects.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-26-ai_model_selector_config_sync/83fb4a0

Mbeaulne commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Mbeaulne Mbeaulne changed the title ai model selector config sync Add AI model quick-select to app menu and injectable model config Jun 26, 2026
@Mbeaulne Mbeaulne force-pushed the 06-26-ai_model_selector_config_sync branch from 33a0c52 to 5311d23 Compare June 26, 2026 14:25
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch from 1cbbab5 to 3df9bcc Compare June 26, 2026 14:40
@Mbeaulne Mbeaulne force-pushed the 06-26-ai_model_selector_config_sync branch from 5311d23 to 4a6b557 Compare June 26, 2026 14:40
@Mbeaulne Mbeaulne marked this pull request as ready for review June 26, 2026 14:41
@Mbeaulne Mbeaulne requested a review from a team as a code owner June 26, 2026 14:41
@Mbeaulne Mbeaulne force-pushed the 06-26-ai_model_selector_config_sync branch from 4a6b557 to e0afa9f Compare June 26, 2026 15:12
@Mbeaulne Mbeaulne force-pushed the 06-26-ai_model_selector_config_sync branch from e0afa9f to 83fb4a0 Compare June 26, 2026 15:25
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.

1 participant