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?

Abierto
#595 1 comentario 3 reacciones 0 asignados Ver en GitHub
bug p2 provider:1p
Lenguaje dominante
TypeScript
Estrellas
8.9k
Forks
2.1k
Merge medio
3 d 9 h
PR fusionados (30 d)
10

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.