Skip to content

fix(acp): honor configured model for new sessions - #251

Open
atty57 wants to merge 1 commit into
vstorm-co:mainfrom
atty57:fix/acp-default-model
Open

atty57 wants to merge 1 commit into
vstorm-co:mainfrom
atty57:fix/acp-default-model

Conversation

@atty57

@atty57 atty57 commented Oct 25, 2026

Copy link
Copy Markdown

Summary

The ACP entry point always initialized sessions with the first hard-coded
Anthropic picker option, overriding --model, PYDANTIC_DEEP_MODEL, and provider
auto-detection. Put the resolved default first so the picker and agent factory
use the configured model, including custom model IDs.

- new session: first hard-coded model
+ new session: --model, then PYDANTIC_DEEP_MODEL, then provider auto-detection

Changes

  • Select the resolved default once in the picker, preserving built-in labels.
  • Add nine regression cases for precedence, custom IDs, provider detection,
    agent creation during prompts, and new sessions after a model switch.
  • Document model-selection precedence in both ACP guides.

Testing

  • New regression tests added and passing.
  • Full test suite passes with 100% coverage on Python 3.10-3.13 (2,852 tests per version).
  • Linting and formatting pass.
  • Pyright and MyPy pass on Linux.
  • Bandit reports no medium/high findings.
  • Full check suite passes: make all on Linux with Python 3.12.
  • Documentation builds.
  • Fresh package-only install builds the default agent.
  • All configured pre-commit hooks pass for the changed files.

Against the original entry point, eight of the nine regression cases fail
because sessions always select anthropic:claude-opus-4-6. With the fix, all
nine cases pass, including the reported openai-chat:deepseek-chat scenario.

Related Issues

Fixes #250

Notes for Reviewers

The all-file pre-commit run also fails on the original revision because of
existing formatting and spelling problems in unchanged files, including saved
research sessions. Changed-file hooks pass.

The change is reversible and affects ACP startup model selection and picker
ordering. GitHub Actions results will be available after the PR is opened.

New sessions select the first model picker option, which previously overrode the resolved CLI, environment, or provider default. Put the resolved default first and include custom model IDs while preserving built-in labels.

Add nine regression cases and document precedence. Validated on Linux across Python 3.10-3.13: 2,852 tests per version and 100% configured statement and branch coverage. make all, MyPy, docs, fresh install, and changed-file pre-commit hooks pass.

Fixes vstorm-co#250

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

ACP entry point ignores model selection and forces the Anthropic default

1 participant