Closed wonderwhy-er closed 1 week ago
I merged in dynamic model list for OpenRouter into this PR. Also fixed bunch of things. Added list to description.
Would be good to merge.
Edit: Moving to a review comment
Created #276 to capture any additional issues/PRs that should adapt into this refactor after the merge.
Pushed in fix for type check error
Added additional type fix for ProviderInfo import. Should work with dev command now too.
Alright! Looks good based on your changes @wonderwhy-er
Oh, I was doing a code review on this but it seems you already merged it. I was too slow.
Seems to work though the second box populates a bit slow, I was going to see what might be the cause, perhaps it's Ollama taking time to return all the models
Then I saw this:
!! bunny ears to check if something is null or not and turning it into a boolean at the same time. This is clever but wouldn't it be better to just check for null / undefined for code simplicity?
Anyway it doesn't matter now it's merged and it does seem to work well.
Goal
Goal was to provide link to get API key for first time users To achieve that I standardised provider list to include name, static and dynamic model lists and API key url and label. For LM Studio link and label are about downloading LM Studio, for Ollama too
PR Summary
Constants Update:
ProviderInfo
andPROVIDER_LIST
, organizing providers with models and API key links.Base Chat Component Update:
PROVIDER_LIST
dynamically for provider selection, removing hardcoded options.API Key Management Component Update:
Added Dynamic Model list for OpenRouter
Made server use API keys from cookies instead of request body - there were issues with them not being actual in request body
Fixed Google API keys provider - API key was passed as argument while options with it as property was expected