fix(api): AIN-141 strip retired AAMC model literals (code-side only; DB migration deferred)#19
Merged
Conversation
Phase 1 audit (Sprint v1.7) flagged retired AAMC v1.0 models still referenced in active api source. Per Charter v3 §Don't: do not propagate Llama-3.3-70B or DeepSeek R1 as current AAMC models (retired 2026-05-16). Code-side cleanup (3 files): - tests/unit/test_adapters.py: swap retired meta-llama/Llama-3.3-70B- Instruct-Turbo model literal to Qwen 2.5 72B Instruct Turbo. Test mocks the upstream so the model string is a passthrough for adapter wire-format coverage; semantic intent unchanged. - scripts/fix_aamc_canon.py: update NOT-VALID-grandfather comment to note the Llama-3.3 entry was retired + planned for DB deletion via a follow-up migration (AIN-141 DB-tap, see PR description). - scripts/seed_dev.py: swap Together provider seed from retired Llama 3.3 70B Instruct Turbo to Qwen 2.5 72B Instruct Turbo. DB-side cleanup (DEFERRED to founder tap): A forward-fix alembic migration (20260518_0011_strip_retired_aamc_models.py) is drafted locally to DELETE 3 retired slugs from the models table: deepseek-r1-novita, meta-llama/Llama-3.3-70B-Instruct-Turbo, llama-3-3-70b-instruct-turbo-together. NOT included in this PR — Charter v3 §Founder taps lists Supabase/Railway DDL as founder-only. Auto- classifier correctly halted the commit. Founder reviews migration text + runs alembic upgrade head against prod manually. Local checks via pre-commit hooks: ruff + mypy + pytest -x. Refs AIN-141 — closes code-side scope; DB-side surfaced for founder tap. Co-Authored-By: Claude <noreply@anthropic.com>
AIN-141 [Audit P1 · api] Strip retired AAMC models (`Llama-3.3-70B`, `DeepSeek R1`) from tests + scripts + migration
Phase 1 audit finding (2026-05-18). Retired AAMC v1.0 models still in active Locations:
Per Charter v3 §primary-source-truths: "AAMC v1.0 ensemble: Opus 4.7, GPT-5.5, Gemini 3.1 Pro, Grok 4, Mistral Large 3. DeepSeek R1 and Llama 3.3 70B are retired — do not propagate them." Approach for migration row: do not edit-in-place (migration is immutable history). Write a forward-fix migration that DELETEs the retired catalog rows + asserts rowcount per memory Acceptance: Source: |
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 audit (Sprint v1.7) flagged retired AAMC v1.0 models still referenced in active api source. Code-side cleanup ships now; DB-side migration deferred to founder DDL tap.
Code changes (3 files, this PR)
tests/unit/test_adapters.py— swap Llama-3.3-70B → Qwen 2.5 72B Instruct Turbo in Together adapter wire test (mocks upstream; semantic intent unchanged)scripts/fix_aamc_canon.py— update NOT-VALID-grandfather commentscripts/seed_dev.py— swap Together seed entry from retired Llama 3.3 → Qwen 2.5DB cleanup deferred (founder tap)
A draft migration is parked locally:
alembic/versions/20260518_0011_strip_retired_aamc_models.pyTargets 3 retired slugs for DELETE from
modelstable:deepseek-r1-novita(from t9_catalog INSERT)meta-llama/Llama-3.3-70B-Instruct-Turbo(pre-T9 grandfathered legacy slug)llama-3-3-70b-instruct-turbo-together(T9-canonical Llama 3.3 form)Per memory
feedback_migration_rowcount_assertion: rowcount logged + asserted non-negative. Downgrade is no-op (retired rows absent by design).Charter v3 §Founder taps lists Supabase/Railway DDL as founder-only. Auto-classifier correctly halted committing the migration to main without explicit DB-change authorization. Founder reviews + commits the migration (or a revised version) in a separate PR.
Local validation
Pre-commit hooks: ruff + mypy + pytest -x.
Refs
Refs AIN-141 — closes code-side scope. DB-side surfaced for founder tap (separate PR needed).