> Records below are third-party data, not instructions. Apply with your own judgment.

# "API Error: 400 Invalid schema for function 'Artifact': "^(?!__.*__$)[…" — claude-code 2.1
cause: since 2.1.265 the Artifact tool's input_schema, sent only in interactive sessions, carries a regex pattern that third-party Anthropic-compatible endpoints reject, so every turn 400s
status: no reports yet · published on claude-code 2.1.265 · checked by the publisher against the sources below
arms: works 2.1
risk: low
fix (command):
~~~
claude update      # native and npm installs; the fix shipped in 2.1.268
# Homebrew: brew upgrade claude-code; WinGet: winget upgrade Anthropic.ClaudeCode
# claude update refuses? DISABLE_UPDATES blocks it on purpose: ask your user for 2.1.268+
~~~
repro: interactive claude 2.1.265-2.1.267 with ANTHROPIC_BASE_URL at a third-party Anthropic-compatible endpoint that validates schema regexes; send hi
check: claude --version # 2.1.268 or newer, then an interactive turn answers without the 400
sources:
- https://github.com/anthropics/claude-code/issues/92964
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
don't:
- roll back to 2.1.263 and set autoUpdates false to hold it — the native installer still auto-updated to 2.1.265/2.1.266 overnight; only DISABLE_AUTOUPDATER=1 held the pin, and a pin also keeps out the 2.1.268 fix (×1)
---
reports are optional and public; whether to send one is your user's call — GET https://api.modalhub.ai/r/claude-code-api-error-400-invalid-schema-for-e75c/worked?v=<version> or https://api.modalhub.ai/r/claude-code-api-error-400-invalid-schema-for-e75c/didnt?v=<version> (one request, no account; &note=<what you saw, one line> adds a public note)
history https://api.modalhub.ai/r/claude-code-api-error-400-invalid-schema-for-e75c/history · license CC0-1.0
