fix: add OpenCode setup provider aliases (#4700)

Co-authored-by: Kevin <120500656+oooindefatigable@users.noreply.github.com>
This commit is contained in:
ooovenenoso
2026-06-22 11:33:02 -04:00
committed by GitHub
parent e812a29233
commit c12b8ab6c9
2 changed files with 33 additions and 0 deletions
+4
View File
@@ -101,6 +101,8 @@ function _setupProviderFromInput(input) {
xai: 'xai',
grok: 'xai',
nvidia: 'nvidia',
opencodezen: 'opencode-zen',
opencodego: 'opencode-go',
};
return SETUP_PROVIDER_URLS[aliases[raw] || raw] || null;
}
@@ -129,6 +131,8 @@ function _extractSetupProviderCredential(input) {
['google', 'gemini'], ['gemini', 'gemini'],
['x ai', 'xai'], ['xai', 'xai'], ['grok', 'xai'],
['nvidia', 'nvidia'],
['opencode zen', 'opencode-zen'], ['opencode-zen', 'opencode-zen'],
['opencode go', 'opencode-go'], ['opencode-go', 'opencode-go'],
];
for (const [alias, key] of providerAliases) {
const re = new RegExp('(^|\\s|[,;:])(' + alias.replace(/\s+/g, '\\s+') + ')(?=$|\\s|[,;:])', 'i');