|
|
@@ -884,6 +884,18 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
|
|
|
)
|
|
|
case "@ai-sdk/amazon-bedrock/mantle":
|
|
|
case "@ai-sdk/openai": {
|
|
|
+ if (model.providerID === "meta") {
|
|
|
+ return Object.fromEntries(
|
|
|
+ OPENAI_EFFORTS.map((effort) => [
|
|
|
+ effort,
|
|
|
+ {
|
|
|
+ reasoningEffort: effort,
|
|
|
+ reasoningSummary: "auto",
|
|
|
+ include: INCLUDE_ENCRYPTED_REASONING,
|
|
|
+ },
|
|
|
+ ]),
|
|
|
+ )
|
|
|
+ }
|
|
|
// https://v5.ai-sdk.dev/providers/ai-sdk-providers/openai
|
|
|
const efforts = openaiReasoningEfforts(model.api.id, model.release_date)
|
|
|
return Object.fromEntries(
|
|
|
@@ -1128,11 +1140,20 @@ export function options(input: {
|
|
|
|
|
|
if (
|
|
|
input.providerOptions?.setCacheKey !== false &&
|
|
|
- (input.model.providerID === "openai" || input.model.api.npm === "@ai-sdk/xai" || input.providerOptions?.setCacheKey)
|
|
|
+ (input.model.providerID === "openai" ||
|
|
|
+ input.model.api.npm === "@ai-sdk/openai" ||
|
|
|
+ input.model.api.npm === "@ai-sdk/xai" ||
|
|
|
+ input.providerOptions?.setCacheKey)
|
|
|
) {
|
|
|
result["promptCacheKey"] = input.sessionID
|
|
|
}
|
|
|
|
|
|
+ if (input.model.providerID === "meta" && input.model.api.npm === "@ai-sdk/openai") {
|
|
|
+ result["reasoningEffort"] = "high"
|
|
|
+ result["reasoningSummary"] = "auto"
|
|
|
+ result["include"] = INCLUDE_ENCRYPTED_REASONING
|
|
|
+ }
|
|
|
+
|
|
|
if (input.model.api.npm === "@ai-sdk/google" || input.model.api.npm === "@ai-sdk/google-vertex") {
|
|
|
if (input.model.capabilities.reasoning) {
|
|
|
result["thinkingConfig"] = {
|