new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

anthropic-vertex/capabilities

7 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Google Vertex Anthropic reasoning example with generateText

Example of using reasoning with Google Vertex Anthropic: import { vertexAnthropic } from '@ai-sdk/google-vertex/anthropic'; import { generateText } from 'ai'; const { text, reasoningText, reasoning } = await generateText({ model: vertexAnthropic('claude-3-7-sonnet@20250219'), prompt: 'How many people will live in the world in 2040?', providerOptions: { anthropic: { thinking: { type: 'enabled', budgetTokens: 12000 }, }, }, });

Google Vertex Anthropic cache control support status

Anthropic cache control is in Pre-Generally Available (GA) state on Google Vertex. Refer to Google Vertex Anthropic cache control documentation for more details.

Google Vertex Anthropic cache control example

Example of using cache control with Google Vertex Anthropic: import { vertexAnthropic } from '@ai-sdk/google-vertex/anthropic'; import { generateText } from 'ai'; const result = await generateText({ model: vertexAnthropic('claude-3-5-sonnet-20240620'), messages: [{ role: 'user', content: [{ type: 'text', text: 'You are a JavaScript expert.' }, { type: 'text', text: `Error message: ${errorMessage}`, providerOptions: { anthropic: { cacheControl: { type: 'ephemeral' } }, }, }, { type: 'text', text: 'Explain the error message.' }] }] }); Cache read and write token counts are accessed at result.usage.inputTokenDetails.cacheReadTokens and result.usage.inputTokenDetails.cacheWriteTokens.

Google Vertex Anthropic cache control on system messages

Cache control can be applied to system messages on Google Vertex Anthropic by providing multiple system messages at the head of the messages array and setting providerOptions with cacheControl for specific system messages.

Google Vertex Anthropic streaming tool calls behavior

The Anthropic API on Google Vertex returns streaming tool calls all at once after a delay, causing structured output generation to complete fully after a delay instead of streaming incrementally.

AnthropicVertex text generation example

Example of generating text with AnthropicVertex: ```ts import { anthropicVertex } from 'anthropic-vertex-ai'; import { generateText } from 'ai'; const { text } = await generateText({ model: anthropicVertex('claude-3-sonnet@20240229'), prompt: 'Write a vegetarian lasagna recipe for 4 people.', }); ``` This example shows how to use AnthropicVertex language models with the generateText function.

AnthropicVertex streaming and structured data support

AnthropicVertex language models support the `streamText` function and structured data generation with the `Output` API from AI SDK Core.

Give your agent this brain