mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 17:08:34 +08:00
fix: don't guess model when profile id is set but unresolved
Narrow the else branch so an unresolved agent_profile_id leaves cloudLlmModel null instead of shipping the active profile's model, which the backend may classify differently. Addresses review r3729854279.
This commit is contained in:
@@ -221,9 +221,11 @@ export const useCreateConversation = () => {
|
||||
resolvedLlmProfiles?.active_profile ??
|
||||
undefined;
|
||||
}
|
||||
} else {
|
||||
} else if (!effectiveAgentProfileId) {
|
||||
referencedLlmProfile = resolvedLlmProfiles?.active_profile ?? undefined;
|
||||
}
|
||||
// effectiveAgentProfileId set but unresolved → cloudLlmModel stays null;
|
||||
// the backend classifies from the resolved profile.
|
||||
const cloudLlmModel =
|
||||
isCloud && referencedLlmProfile
|
||||
? (resolvedLlmProfiles?.profiles.find(
|
||||
|
||||
Reference in New Issue
Block a user