Skip to content

Commit eed4d98

Browse files
committed
fix(ai): keep ModelStudio token field canonical
1 parent 5aaaa88 commit eed4d98

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎packages/ai/src/transports/openai-completions-compat.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,9 @@ function resolveOpenAICompletionsCompatDefaults(
7777
const isDefaultRoute = endpointClass === "default";
7878
const usesConfiguredNonOpenAIEndpoint =
7979
endpointClass !== "default" && endpointClass !== "openai-public";
80+
const isMoonshot = knownProviderFamily === "moonshot" || endpointClass === "moonshot-native";
8081
const isMoonshotLike =
81-
knownProviderFamily === "moonshot" ||
82-
knownProviderFamily === "modelstudio" ||
83-
endpointClass === "moonshot-native" ||
84-
endpointClass === "modelstudio-native";
82+
isMoonshot || knownProviderFamily === "modelstudio" || endpointClass === "modelstudio-native";
8583
const isModelStudioLike =
8684
knownProviderFamily === "modelstudio" ||
8785
endpointClass === "modelstudio-native" ||
@@ -120,7 +118,7 @@ function resolveOpenAICompletionsCompatDefaults(
120118
endpointClass === "chutes-native" ||
121119
endpointClass === "mistral-public" ||
122120
knownProviderFamily === "mistral" ||
123-
isMoonshotLike ||
121+
isMoonshot ||
124122
isCloudflareAiGateway ||
125123
isZai ||
126124
isTogether ||

0 commit comments

Comments
 (0)