Fix custom providers not passing model name properly

This commit is contained in:
gsxdsm
2026-02-14 19:24:10 -08:00
parent 5ffbfb3217
commit bcc854234c
6 changed files with 68 additions and 18 deletions

View File

@@ -230,10 +230,9 @@ export class IdeationService {
);
if (providerResult.provider) {
claudeCompatibleProvider = providerResult.provider;
// Use resolved model from provider if available (maps to Claude model)
if (providerResult.resolvedModel) {
modelId = providerResult.resolvedModel;
}
// CRITICAL: For custom providers, use the provider's model ID (e.g. "GLM-4.7")
// for the API call, NOT the resolved Claude model - otherwise we get "model not found"
modelId = options.model;
credentials = providerResult.credentials ?? credentials;
}
}