parseCatalogBetas (anthropic/betas.ts)

lace · packages/agent/src/providers/anthropic/betas.ts · typescript · Apache-2.0
ai

Computes deduped Anthropic beta flags from catalog, config, and request options.

// Source: https://github.com/obra/lace | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// ABOUTME: Helpers for computing the typed betas[] array sent to client.beta.messages.*
// ABOUTME: Merges per-model catalog betas, global observability betas, and per-call betas

import type { AnthropicBeta } from '@anthropic-ai/sdk/resources/beta/beta';
import type { CatalogProvider } from '@lace/agent/providers/catalog/types';

/**
 * Observability betas that Anthropic-direct requests opt into by default.
 *
 * - `cache-diagnosis-2026-04-07`: surfaces cache-miss reasons inline on responses.
 * - `model-context-window-exceeded-2025-08-26`: makes the API return a typed
 *   stop_reason instea

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key