Skip to content

Commit 94cb887

Browse files
authored
🐛 fix: fix cohere model list fetch
1 parent c3ba74c commit 94cb887

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libs/agent-runtime/cohere/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ChatModelCard } from '@/types/llm';
55

66
export interface CohereModelCard {
77
context_length: number;
8-
features: string[];
8+
features: string[] | null;
99
name: string;
1010
supports_vision: boolean;
1111
}
@@ -47,7 +47,7 @@ export const LobeCohereAI = LobeOpenAICompatibleFactory({
4747
displayName: knownModel?.displayName ?? undefined,
4848
enabled: knownModel?.enabled || false,
4949
functionCall:
50-
model.features.includes("tools")
50+
(model.features && model.features.includes("tools"))
5151
|| knownModel?.abilities?.functionCall
5252
|| false,
5353
id: model.name,

0 commit comments

Comments
 (0)