Skip to content

feat: add provider models endpoint and fix Settings Save buttons#1042

Closed
AmidVoshakul wants to merge 1 commit intoRightNow-AI:mainfrom
AmidVoshakul:feat/provider-models-list
Closed

feat: add provider models endpoint and fix Settings Save buttons#1042
AmidVoshakul wants to merge 1 commit intoRightNow-AI:mainfrom
AmidVoshakul:feat/provider-models-list

Conversation

@AmidVoshakul
Copy link
Copy Markdown

Summary

Adds /api/providers/:id/models endpoint and fixes Settings functionality issues:

  • Fixes Save buttons not working in Settings > Config (CSP was blocking Alpine.js)
  • Model dropdown now filters to show only models for selected provider
  • Auto-resets model to provider's default when provider changes

Changes

  • API: New GET /api/providers/:id/models returns available models for a specific provider
  • ModelCatalog: New default_model_for_provider() method for default model per provider
  • Settings: Model dropdown dynamically filters by selected provider
  • Settings: Save buttons now work (CSP relaxed with 'unsafe-inline')
  • Config: Provider auth_status only shows "configured" when both URL and API key exist

Testing

  • Live integration tested - Settings > Config shows correct models per provider
  • Verified model resets to default when provider changes
  • Agents > Spawn form works correctly

Security

  • No new unsafe code
  • No secrets in diff
  • User input validated at API boundaries

- Add /api/providers/:id/models endpoint to list available models per provider
- Add default_model_for_provider() method in ModelCatalog
- Fix CSP to allow inline Alpine.js scripts (Save buttons now work)
- Fix provider auth_status: only mark as configured if URL + API key exist
- Settings > Config: model dropdown filters by selected provider
- When provider changes, model auto-resets to provider's default
- Update agents UI with provider model selection
@AmidVoshakul AmidVoshakul reopened this Apr 12, 2026
@AmidVoshakul AmidVoshakul deleted the feat/provider-models-list branch April 12, 2026 19:51
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