Skip to content

Fix seed provider default_reasoning_effort for non-claude/codex kinds - #12

Open
amirfish1 wants to merge 1 commit into
ofekron:mainfrom
amirfish1:fix/seed-provider-default-reasoning-effort
Open

Fix seed provider default_reasoning_effort for non-claude/codex kinds#12
amirfish1 wants to merge 1 commit into
ofekron:mainfrom
amirfish1:fix/seed-provider-default-reasoning-effort

Conversation

@amirfish1

Copy link
Copy Markdown

Summary

  • _new_provider_record() hardcoded default_reasoning_effort to the global DEFAULT_REASONING_EFFORT ("medium") for every provider kind.
  • Kinds whose reasoning_effort_options exclude "medium" (e.g. agy, copilot, qwen, amp — no options at all — or opencode: minimal/high/max) got a seeded record that fails the strict round-trip canonicalization check in _normalize_loaded_state, crashing apply_installation_profile_selection on first install with:
    RuntimeError: unsupported provider config schema: noncanonical provider record
    
  • Fixed by computing default_reasoning_effort the same kind-aware way _clean_provider_record does, so newly seeded providers always round-trip cleanly.

Test plan

  • Verified _new_provider_record(kind) round-trips through _clean_provider_record (== canonical) for every provider_manifest.installable_kinds(): agy, amp, claude, codex, copilot, opencode, pi, qwen — all OK.
  • Reproduced the original crash locally with an agy-selected installation.json and confirmed dependency_plan.py apply-selection no longer raises noncanonical provider record after the fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_014ZVWhGL56jcSi2Fb3EUx2g

_new_provider_record() hardcoded default_reasoning_effort to the global
DEFAULT_REASONING_EFFORT ("medium") regardless of provider kind. Kinds
whose reasoning_effort_options exclude "medium" (e.g. agy, copilot,
qwen, amp — no options at all — or opencode: minimal/high/max) produced
a record that failed the strict round-trip canonicalization check in
_normalize_loaded_state, crashing apply_installation_profile_selection
on first install with "unsupported provider config schema: noncanonical
provider record".

Compute the value the same kind-aware way _clean_provider_record does,
so newly seeded providers always round-trip cleanly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ZVWhGL56jcSi2Fb3EUx2g
@amirfish1
amirfish1 requested a review from ofekron as a code owner August 6, 2026 13:58
ofekron added a commit that referenced this pull request Aug 6, 2026
Locks the invariant amirfish1 reported in PR #12: seeding must derive
default_reasoning_effort kind-aware, so kinds whose options exclude
"medium" (agy, amp, copilot, qwen — no options; opencode —
minimal/high/max) do not produce a noncanonical record that crashes
first install with "noncanonical provider config schema".

The original defect lived in _new_provider_record on main; on dev the
value moved to _seed_profile_for_provider and is already kind-aware.
This test covers the current shape so the regression cannot return.

Reported-by: Amir Fish <amir.fish@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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