You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ai-anthropic: codegen can't fetch the spec since .stats.yml dropped openapi_spec_url #9501
packages/ai/anthropic/codegen.yml gets its spec through type: stainless-stats, which reads openapi_spec_url from https://raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/main/.stats.yml. That file stopped carrying openapi_spec_url on 2026-09-03 (anthropics/anthropic-sdk-typescript@8752d02422). It now holds only configured_endpoints, so fetchViaStainlessStats fails with SpecFetchError and the Anthropic schemas can't be regenerated.
src/Generated.ts is now behind the API. For example, BetaThinkingConfigAdaptive / ThinkingConfigAdaptive are { type: "adaptive" } only. The spec above has an optional display: "summarized" | "omitted" (plus "updates" and block_binding on the beta variant). Because the encoder strips unknown keys, callers can't set display through Config. That matters for models that default display to "omitted", where thinking blocks then stream with empty text. Today the only way around it is rewriting the request body in transformClient.
Notes from trying a regeneration
Pointing spec: at the pinned URL above and running effect-ai-codegen generate --provider anthropic succeeds in fetching and generating, but:
the diff to Generated.ts is large (about 19k insertions and 12.5k deletions), and
the generator's own Oxlint post-processing step then fails on the output (PostProcessError: lint failed).
So this probably needs a maintainer-run regeneration rather than an outside PR. It also needs a decision on where the spec comes from now that .stats.yml no longer names it: pinning a URL in codegen.yml works, but goes stale without anyone noticing.
Activity