Open router initial implementation#239
Merged
Merged
Conversation
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.
Collaborator
|
Check and also fixed the issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why?
Users have been asking for OpenRouter support. They ask for it, they get it.
Features/items added