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

google-vertex-xai/capabilities

5 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 xAI language model usage example

Example of using Google Vertex xAI with generateText: import { googleVertexXai } from '@ai-sdk/google-vertex/xai'; import { generateText } from 'ai'; const { text } = await generateText({ model: googleVertexXai('xai/grok-4.1-fast-reasoning'), prompt: 'Invent a new holiday and describe its traditions.', });

Google Vertex xAI streaming example

Example of streaming with Google Vertex xAI: import { googleVertexXai } from '@ai-sdk/google-vertex/xai'; import { streamText } from 'ai'; const result = streamText({ model: googleVertexXai('xai/grok-4.1-fast-reasoning'), prompt: 'Invent a new holiday and describe its traditions.', }); for await (const textPart of result.textStream) { process.stdout.write(textPart); }

Google Vertex xAI function calling example

Example of function calling with Google Vertex xAI: import { googleVertexXai } from '@ai-sdk/google-vertex/xai'; import { generateText, tool } from 'ai'; import { z } from 'zod'; const result = await generateText({ model: googleVertexXai('xai/grok-4.1-fast-reasoning'), tools: { weather: tool({ description: 'Get the weather in a city', inputSchema: z.object({ city: z.string() }), execute: async ({ city }) => `The weather in ${city} is sunny.`, }), }, prompt: 'What is the weather in San Francisco?', });

Google Vertex xAI structured outputs example

Example of structured outputs with Google Vertex xAI: import { googleVertexXai } from '@ai-sdk/google-vertex/xai'; import { generateText, Output } from 'ai'; import { z } from 'zod'; const result = await generateText({ model: googleVertexXai('xai/grok-4.1-fast-reasoning'), output: Output.object({ schema: z.object({ name: z.string(), date: z.string(), participants: z.array(z.string()), }), }), prompt: 'Alice and Bob are going to a science fair on Friday.', });

Google Vertex xAI reasoning token counts

Grok reasoning models on Google Vertex report reasoning token counts in usage metadata but do not support the reasoning_effort request parameter.

Give your agent this brain