Merge pull request #105 from continuedev/fix-chad-bug

include models without roles
This commit is contained in:
Nate Sesti 2025-07-28 11:22:22 -07:00 • committed by GitHub
commit a62e71cc43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,8 +30,9 @@ export function getLlmApi(
assistant: AssistantUnrolled,
authConfig: AuthConfig
): [BaseLlmApi, ModelConfig] {
const model = assistant.models?.find((model) =>
model?.roles?.includes("chat")
const model = assistant.models?.find(
(model) =>
model?.roles?.includes("chat") || (model && model.roles === undefined)
);
if (!model) {