Skip to content

fix(docs): replace dots with hyphens in Anthropic model identifiers#3656

Open
Abubakar-01 wants to merge 1 commit intoCopilotKit:mainfrom
Abubakar-01:fix/docs-anthropic-model-identifier-format
Open

fix(docs): replace dots with hyphens in Anthropic model identifiers#3656
Abubakar-01 wants to merge 1 commit intoCopilotKit:mainfrom
Abubakar-01:fix/docs-anthropic-model-identifier-format

Conversation

@Abubakar-01
Copy link
Copy Markdown
Contributor

What

Updated all Anthropic model specifiers in the docs to use hyphens instead
of dots in version numbers.

Why

Model identifiers with dots (e.g. anthropic:claude-sonnet-4.5) are invalid
and will fail at runtime. The correct format uses hyphens
(e.g. anthropic:claude-sonnet-4-5), consistent with how Anthropic
formats its model IDs.

Fix

Replaced dots with hyphens in the version portion of the following specifiers:

Before After
anthropic:claude-sonnet-4.5 anthropic:claude-sonnet-4-5
anthropic:claude-3.7-sonnet anthropic:claude-3-7-sonnet
anthropic:claude-opus-4.1 anthropic:claude-opus-4-1
anthropic:claude-3.5-haiku anthropic:claude-3-5-haiku

Models with whole number versions (claude-sonnet-4, claude-opus-4)
were already correct and left unchanged.

Verified

All 6 models confirmed as live and valid against Anthropic's official
models overview at platform.claude.com/docs/en/about-claude/models/overview.
The hyphenated format matches Anthropic's official API IDs
(e.g. claude-sonnet-4-5-20250929, claude-opus-4-1-20250805).

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: 897d79e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 8, 2026

@Abubakar-01 is attempting to deploy a commit to the CopilotKit Team on Vercel.

A member of the Team first needs to authorize it.

jpr5 added a commit that referenced this pull request Apr 8, 2026
Anthropic API and AI SDK both use hyphens (claude-sonnet-4-5) not dots
(claude-sonnet-4.5). Updates model-selection and advanced-configuration
docs. Also updates allowlist with current Anthropic model IDs including
4.6 family.

Supersedes #3656.
jpr5 added a commit that referenced this pull request Apr 9, 2026
- gpt-5.2/gpt-5.2-mini → gpt-5.4/gpt-5.4-mini across 70 files
- Anthropic model IDs: dots → hyphens (claude-sonnet-4-5, not 4.5)
- LangGraph FastAPI: add missing uvicorn import, MemorySaver checkpointer,
  fix port string→int
- AG2: ContextVariables import moved to autogen.agentchat
- CrewAI Flows: comment out deprecated CLI option
- Pydantic: pin Starlette 0.45.3 (1.0.0 is incompatible)
- CopilotChat: add missing default export
- All quickstarts: add globals.css import to layout examples
- LangGraph quickstart tagged with doctest="server" for Phase 1

Supersedes #3655, #3656, #3658, #3660, #3661, #3665, #3667, #3669.
jpr5 added a commit that referenced this pull request Apr 9, 2026
## Summary

Comprehensive docs quality infrastructure — model name validation,
executable doc tests, and 8 community docs fixes rolled up.

### Docs fixes (supersedes 8 PRs)
- **gpt-5.2 → gpt-5.4** across 70 files, 124 occurrences (supersedes
#3655)
- **Anthropic model IDs** dots → hyphens to match API/AI SDK format
(supersedes #3656)
- **LangGraph FastAPI quickstart** — missing `import uvicorn`, missing
`MemorySaver` checkpointer, `port` string→int (supersedes #3661, with
contributor's `langgrapg` typo fixed)
- **AG2 ContextVariables import** — moved from `autogen` to
`autogen.agentchat` per latest AG2 (supersedes #3658, verified via
Docker)
- **CrewAI Flows** — comment out deprecated CLI option (supersedes
#3667)
- **Pydantic quickstart** — pin Starlette 0.45.3 (1.0.0 is incompatible,
verified via Docker) (supersedes #3660)
- **CopilotChat example** — add missing `default` export for Next.js
page components (supersedes #3669)
- **globals.css import** — add to all 9 quickstart layout examples so
customization section works (supersedes #3665)

### Model name validation (new)
- `docs/model-allowlist.json` — maintained list of valid model names by
provider (OpenAI, Anthropic, Google, Cohere, Meta)
- `scripts/validate-doc-model-names.ts` — CI lint that extracts model
names from docs code blocks and validates against allowlist
- 20 tests

### Executable doc tests (new, Phase 1)
- `scripts/doc-tests/extract.ts` — remark + remark-mdx AST parser finds
`doctest`-tagged code blocks in MDX
- `scripts/doc-tests/run.ts` — execution harness: installs deps, points
at aimock, runs server/script/component snippets
- `.github/workflows/test_doc-examples.yml` — CI triggered on `docs/**`
changes (previously excluded from ALL CI)
- LangGraph FastAPI quickstart tagged as first `doctest="server"`
example
- 10 tests for extraction

### Spec
[Executable Doc Tests proposal on
Notion](https://www.notion.so/33c3aa38185281388a21e8dfe752ac5e)

## Supersedes
| PR | Fix | Status |
|----|-----|--------|
| #3655 | gpt-5.2-mini → gpt-5.4-mini | ✅ Included (all 70 files, not
just 22) |
| #3656 | Anthropic dots → hyphens | ✅ Included |
| #3658 | AG2 ContextVariables import | ✅ Included (verified via Docker)
|
| #3660 | Starlette pin | ✅ Included (verified via Docker) |
| #3661 | LangGraph FastAPI quickstart | ✅ Included (with typo fix) |
| #3665 | globals.css import | ✅ Included |
| #3667 | CrewAI deprecated CLI | ✅ Included |
| #3669 | CopilotChat default export | ✅ Included |

All 8 PRs can be closed when this merges.

## Test plan
- [x] Model name validator passes (0 violations)
- [x] 20 validator unit tests pass
- [x] 10 extraction unit tests pass
- [x] Build passes
- [x] Commitlint passes
- [ ] CI workflow validates doc examples on docs/** changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant