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:
openhands
2026-08-06 18:04:05 -03:00
parent 76bb94d29a
commit d428007d83
@@ -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(