Skip to content

Add models available on the server + auto approval option - #142

Open
Nouvborne wants to merge 5 commits into
grapeot:masterfrom
Nouvborne:master
Open

Add models available on the server + auto approval option#142
Nouvborne wants to merge 5 commits into
grapeot:masterfrom
Nouvborne:master

Conversation

@Nouvborne

Copy link
Copy Markdown

No description provided.

The model picker was hardcoded to a 7-entry ModelPreset array that
went stale as soon as the server's provider/model lineup changed.
loadProvidersConfig() already fetched the full /config/providers
response and built providerModelsIndex from it, but that data was
only ever used by the context-usage ring - it never fed back into
modelPresets itself.

- AppState: rename the hardcoded array to defaultModelPresets (used
  only before the first successful connection, or if it fails) and
  add applyDynamicModelPresets(from:), called at the end of
  loadProvidersConfig(), which rebuilds modelPresets from the live
  server response and preserves the current selection by ID across
  the swap.
- Add groupedModelPresetIndices to AppState+Models and provider
  section headers in the picker sheet.
- Add a searchable filter matching model name or provider name.
- refresh() now syncs the picker against message history.
- Tapping a model now selects and dismisses the sheet immediately.

Cherry-picked from grapeot#125

Fixes grapeot#99
Adds a Settings toggle that automatically allows incoming tool
permission requests instead of surfacing permission cards. Auto-approve
responses use .always when the server offers always-patterns, otherwise
.once. Applied both on SSE permission.asked events and when polling
pending permissions on session entry.
Drop the empty userhash field on the catbox upload (caused 'Invalid
uploader') and add retry loops for both catbox and litterbox uploads so
the share step reliably yields a download URL.
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