fix: address assistant review feedback
This commit is contained in:
1 parent
cf6aefa48a
commit
8a2375b3ef
28 files changed
+351
-58
No files matched your search
@@ -21,3 +21,21 @@ export const resolveAssistantPreferenceModelId = ({
|
||||
if (currentModelId && models.some((model) => model.id === currentModelId)) return currentModelId;
|
||||
return defaultModelId;
|
||||
};
|
||||
|
||||
export const resolveAssistantThreadPreferenceModelId = ({
|
||||
isRemote,
|
||||
metadataLoaded,
|
||||
threadModelId,
|
||||
defaultModelId,
|
||||
models,
|
||||
}: {
|
||||
isRemote: boolean;
|
||||
metadataLoaded: boolean;
|
||||
threadModelId: unknown;
|
||||
defaultModelId: string | null;
|
||||
models: readonly AssistantRuntimeModelOption[];
|
||||
}) => {
|
||||
if (isRemote && !metadataLoaded) return undefined;
|
||||
if (typeof threadModelId === "string" && models.some((model) => model.id === threadModelId)) return threadModelId;
|
||||
return defaultModelId;
|
||||
};
|
||||
Reference in new issue
Block a user