Skip to content

Open router initial implementation#239

Merged
korivi-CraftOS merged 6 commits into
V1.3.1from
feature/open-router
May 11, 2026
Merged

Open router initial implementation#239
korivi-CraftOS merged 6 commits into
V1.3.1from
feature/open-router

Conversation

@zfoong
Copy link
Copy Markdown
Collaborator

@zfoong zfoong commented May 7, 2026

What and why?
Users have been asking for OpenRouter support. They ask for it, they get it.

Features/items added

  • OpenRouter as LLM/VLM provider
  • Setting page support basic OpenRouter operation

@zfoong zfoong changed the title Open router initiate implementation Open router initial implementation May 7, 2026
zfoong and others added 5 commits May 8, 2026 14:57
Bug 1: Catalog does not re-fetch when the base URL changes
Bug 2: Base URL precedence was backwards
Bug 3: VLM auto-select did not enable the Save button

1: requestedRef.current was set to true on first load and never reset, so changing the base URL, for example a custom OpenRouter gateway, was silently ignored. The catalog kept showing results from the original URL until the user manually clicked Refresh. I fixed this by resetting the ref when baseUrl changes.

2: baseUrls or newBaseUrl means the saved URL always wins over the in-progress URL the user is currently typing. I fixed this to newBaseUrl / baseUrls-openrouter, so unsaved changes take effect immediately in the catalog.

3: When switching to Ollama, if the current VLM model was not in the available list, the code auto-selected d.models[0] but did not call setHasChanges(true). The LLM equivalent correctly did call it. Without hasChanges, the Save button stayed disabled, so the auto-corrected VLM model was never persisted.
@korivi-CraftOS
Copy link
Copy Markdown
Collaborator

Check and also fixed the issue.

@korivi-CraftOS korivi-CraftOS merged commit 9f4ccc7 into V1.3.1 May 11, 2026
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