Skip to content

Commit

Permalink
Merge pull request #3018 from Jesscha/fix/handle-anthropic-json-gener…
Browse files Browse the repository at this point in the history
…ation

fix: change handleAnthropic default mode to auto
  • Loading branch information
tcm390 authored Jan 30, 2025
2 parents bdf9581 + 3980907 commit 08596c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2258,11 +2258,15 @@ async function handleAnthropic({
schema,
schemaName,
schemaDescription,
mode = "json",
mode = "auto",
modelOptions,
runtime,
}: ProviderOptions): Promise<GenerateObjectResult<unknown>> {
elizaLogger.debug("Handling Anthropic request with Cloudflare check");
if (mode === "json") {
elizaLogger.warn("Anthropic mode is set to json, changing to auto");
mode = "auto";
}
const baseURL = getCloudflareGatewayBaseURL(runtime, "anthropic");
elizaLogger.debug("Anthropic handleAnthropic baseURL:", { baseURL });

Expand Down

0 comments on commit 08596c7

Please sign in to comment.