feat(api): AIN-116 Piece #1 · provider_model_name column + routing fallback#44
Merged
Merged
Conversation
…llback Ainfera `slug` is the canonical-for-us identifier (e.g., `claude-opus-4-7`). The provider's API expects its own canonical name (e.g., Anthropic's `claude-opus-4-20251110`). Currently routing.dispatch_inference passes `slug` directly to upstream, which works for AAMC 5 (slug == upstream name) but blocks the 43 deactivated non-AAMC slugs whose names diverge. ## Schema (migration 0016) - `models.provider_model_name TEXT NULL` - Forward-compatible add-column (no backfill) ## Routing fallback `upstream_model = model.provider_model_name or model_slug` - NULL = adapter receives Ainfera slug as-is (current AAMC 5 behavior preserved) - Populated = adapter receives the provider's canonical name ## Audit chain integrity Per "no stealth substitution" rule, audit events still record `model_slug` (Ainfera canonical). This change only affects what we send upstream. ## Deferred to follow-up - Piece #2: fix 4 provider base_urls (groq/fireworks/deepinfra/novita) — requires prod DB UPDATE against `providers` table - Piece #3: backfill provider_model_name for the 43 deactivated rows — requires per-provider /v1/models research + sacrificial test key access + T9 re-fanout Both pieces are Discipline #6 corollary territory (prod DB writes); file as separate sub-tickets for explicit founder auth. Co-Authored-By: Claude <noreply@anthropic.com>
AIN-116 ainfera-auto routing v1.1 + v1.0.1 catalog mapping — provider_model_name, latency, geo, prefs
Update 2026-05-16 19:25 WIB · v1.0.1 prerequisite addedT9 fanout hit the cap-rule (11/54 pass) and 43 new model rows were v1.0.1 (blocker · ~3h)
See v1.1 (after v1.0.1 lands)
Out of scope (v1.2+)
Acceptance after v1.0.1 + v1.1
|
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
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
Schema prerequisite for AIN-116 v1.0.1 catalog mapping. Adds a nullable
provider_model_name TEXTcolumn onmodelsand updates the routing layer to prefer it overslugwhen set.Why
Ainfera
slugis the canonical-for-us identifier (e.g.,claude-opus-4-7). The provider's API expects its own canonical name (e.g., Anthropic'sclaude-opus-4-20251110). Currentlyrouting.dispatch_inferencepassesslugdirectly to upstream, which works for AAMC 5 but blocks 43 deactivated non-AAMC slugs whose names diverge.Audit chain integrity
Per the "no stealth substitution" rule, audit events still record
model_slug(Ainfera canonical). This change only affects what we send upstream.Deferred (separate sub-tickets needed)
providers.provider_model_namefor the 43 deactivated rows. Requires per-provider/v1/modelsresearch + sacrificial test key + T9 re-fanout.Both pieces are Discipline #6 corollary (prod DB writes). File as sub-tickets for explicit founder auth.
Test plan
🤖 Generated with Claude Code