Skip to content

fix(ai): use documented Claude 4.6 model IDs (integrates #9 on current master) - #13

Open
lukisch wants to merge 1 commit into
masterfrom
claude/practical-cori-e0b81u
Open

lukisch wants to merge 1 commit into
masterfrom
claude/practical-cori-e0b81u

Conversation

@lukisch

@lukisch lukisch commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

The AI assistant sends claude-sonnet-4-6-20250514 by default and claude-opus-4-6-20250514 when Opus is selected. These IDs do not exist: they combine the 4.6 generation with the snapshot date of an older model. A request with either one is rejected by the API, so the assistant only works with Haiku selected.

#9 fixed this on 2026-10-15 and was reviewed without functional findings, but it has conflicted with master since then.

Changes

This is the commit from #9 (4bef7f2) cherry-picked onto the current master (f2f3894), original author kept.

  • AIModel.CLAUDE_SONNET is now claude-sonnet-4-6, AIModel.CLAUDE_OPUS is claude-opus-4-6. Haiku 4.5 is unchanged.
  • tests/test_ai_model_ids.py: three fixture-only tests check the model ID and message payload that reach the SDK. No real API request.
  • CHANGELOG.md was the only conflict. Both the store-packaging section and the model-ID section are kept.

Verification

Python 3.12, PySide6 6.8.2.1, QT_QPA_PLATFORM=offscreen:

  • Full suite: 293 passed (290 on master plus the three new tests).
  • ruff check .: clean.
  • No live Anthropic request was made.

Notes for the reviewer

  • DCO: CONTRIBUTING.md asks for a Signed-off-by trailer. I did not add one, because that certification belongs to the author. The recent commits on master do not carry one either.
  • tests/test_cli_and_logging.py::test_cli_licenses_summary_and_export fails on unmodified master in an environment without pip in the interpreter (for example a uv venv): the license list is empty, the JSON export still succeeds, and generate_notice_file returns False. It passes once pip is installed. Not touched here.
  • src/core/settings_manager.py still defaults model to claude-sonnet-4-20250514. I found no code path that sends this value to the SDK, so I left it alone.
  • fix(ai): use documented Claude 4.6 model IDs #9 can be closed once this lands.

Generated by Claude Code

Integrates #9 (4bef7f2) on current master. The only conflict was
CHANGELOG.md; both sections are kept.

The Sonnet and Opus enum values mixed the 4.6 generation with an older
snapshot date. They now use claude-sonnet-4-6 and claude-opus-4-6.
Haiku 4.5 is unchanged. Three fixture-only tests check the model ID
that reaches the SDK.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THB2F17eZ5jWcC9snC7oi1
@github-actions

Copy link
Copy Markdown

Welcome! 👋 Thanks for your first pull request in this repository.

A maintainer will review it soon. Please make sure:

  • Your changes are tested
  • Documentation is updated if needed
  • The PR description explains what and why

Thanks for contributing!

@lukisch lukisch left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Zweitprüfung (Cloud-Bot) – Head 00469ba

Hinweis: Der PR stammt aus einem früheren Bot-Lauf (claude/…-Branch, gleiche GitHub-Identität). Das ist keine unabhängige Prüfung und keine formale Freigabe.

Ergebnis: freigabefähig, keine funktionalen Befunde.

  • Diff geprüft (3 Dateien, +51/−2): nur die beiden Enum-Werte in src/modules/ai_assistant/ai_service.py:17-18, der neue Test und der CHANGELOG-Eintrag.
  • tests/test_ai_model_ids.py: lokal 3 bestanden (Python 3.12). Gegenprobe mit dem ai_service.py von master: 2 von 3 schlagen fehl. Die Tests greifen also.
  • ruff check .: sauber.
  • Gesamtsuite lokal nur teilweise lauffähig: 206 bestanden, die übrigen Qt-Tests scheitern hier an fehlendem libEGL.so.1 (Container, kein Codefehler). Maßgeblich sind die grünen CI-Jobs test (3.11) und test (3.12).
  • Nicht verifiziert: echte API-Anfrage mit den neuen Modellkennungen.

Nicht blockierend:

  • src/core/settings_manager.py:57 enthält weiter den Default claude-sonnet-4-20250514. Er erreicht das SDK nicht (src/gui/main_window.py:1251-1258 bildet nur Anzeigenamen ab), sollte aber in einem Folge-PR bereinigt werden.
  • Der Signed-off-by-Trailer laut CONTRIBUTING.md fehlt. Entscheidung beim Maintainer.

Nicht gemergt; die Freigabe liegt beim Maintainer.


Generated by 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