anthropics / anthropics/claude-code-action

Setting model to claude-sonnet-4-5-20250929 results in the model reporting itself as either Sonnet 3.5 or Sonnet 3.7?

Đang mở
#595 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
bug p2 provider:1p
Ngôn ngữ chính
TypeScript
Star
8.9k
Fork
2.1k
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
10

Mô tả

**Describe the bug**
Updated my workflow today from beta to v1, and set the model to `claude-sonnet-4-5-20250929`, [as specified in the official documentation](https://anthropic.mintlify.app/en/docs/claude-code/github-actions#using-claude-args).

Triggering the workflow by asking the model "what model are you" produces inconsistent (and therefore incorrect) answers. The first time I asked, it reported itself as `claude-3-5-sonnet-202410221`. The second time I asked, it reported itself as `Claude 3.7 Sonnet`.

As a result, I'm left unsure of what model is actually being used. Whatever it is, I assume the inconsistent answers indicate hallucination.

Notably, if I ask Sonnet 4.5 the same question ("what model are you?") in any of the following contexts, it produces the correct answer: claude desktop app, claude code CLI, claude code cursor extension, and native cursor chat.

**To Reproduce**
1. Set `--model claude-sonnet-4-5-20250929` in your YAML:

```yml
- name: Run Claude PR Action
uses: anthropics/claude-code-action@v1
env:
...
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_args: |
--model claude-sonnet-4-5-20250929
--allowedTools "..."
--system-prompt "..."
```

2. Trigger your workflow via an issue comment etc., asking simply "what model are you"?
3. Observe that the answer is not `claude-sonnet-4-5-20250929`. In my case, the first time it reported its model as `claude-3-5-sonnet-20241022`, and the second time `Claude 3.7 Sonnet`. Same YAML file for both runs.

**Expected behavior**
Claude reports itself as Sonnet 4.5 (in whatever format).

**Screenshots**
N/A

**Workflow yml file**
See snippet above in reproduction steps section.

**API Provider**

[ X] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

**Additional context**
Happy to provide additional context as needed.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.