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?

Ouverte
#595 1 commentaire 3 réactions 0 personnes assignées Voir sur GitHub
bug p2 provider:1p
Langage dominant
TypeScript
Étoiles
8.9k
Forks
2.1k
Merge moyen
3 j 9 h
PR mergées (30 j)
10

Description

**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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.