Commit 9d568ef
committed
test(session): cover isAnthropicReasoningModel and tighten provider match
Address review on #30046:
- Extract MessageV2.isAnthropicReasoningModel and replace the broad
providerID.includes("anthropic") with exact provider IDs (anthropic,
google-vertex-anthropic) plus ai-sdk npm checks, consistent with how
provider.ts/transform.ts detect Anthropic.
- Add focused unit tests: first-party, google-vertex-anthropic, the
@ai-sdk/* npm packages, negative cases (openai/google/openrouter), and a
regression test that a provider merely containing "anthropic" is not matched.
test/session/message-v2.test.ts: 41 pass / 0 fail.1 parent 70abf52 commit 9d568ef
2 files changed
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 380 | + | |
384 | 381 | | |
385 | 382 | | |
386 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1658 | 1658 | | |
1659 | 1659 | | |
1660 | 1660 | | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
0 commit comments