Skip to content

feat(shared): map text generation models by provider identity - #253

Merged
leoisadev1 merged 4 commits into
mainfrom
fix/text-generation-model-identity
Sep 14, 2026
Merged

leoisadev1 merged 4 commits into
mainfrom
fix/text-generation-model-identity

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Problem

A future cross-environment settings flow cannot copy a text-generation model by provider instance ID: the same ID may be missing, disabled, or backed by a different provider on the target environment.

Change

Add textGenerationSelectionForTarget, a shared mapping contract that:

  • keeps the same enabled instance when its provider driver matches;
  • maps to another enabled instance of the same driver;
  • falls back to the enabled canonical legacy provider when the target has not migrated that provider to providerInstances;
  • returns no selection when the target cannot safely accept it.

Akeru does not yet have T3 Code's Apply to all shared-settings client, so this PR does not claim to synchronize the General setting today. It provides the tested identity-mapping contract for that future flow.

This is an Akeru adaptation of pingdotgg/t3code#10526.

Verification

  • vp test run packages/shared/src/serverSettings.test.ts — 29 tests passed.
  • Shared package typecheck passed.
  • Targeted lint and formatting passed.

Made with GPT-5.6 Sol in T3 Code through the Codex harness.

Copying a title-generation model by instance id can land on a disabled
or different provider on another environment.

Map the selection onto a target by enabled driver identity instead, and
keep the target's working model when nothing matches.

Upstream: pingdotgg#10526

Grok 4.6 High in Grok Build via Orca.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
akeru-bot-landing Building Building Preview Sep 10, 2026 6:37pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 10, 2026
@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Greptile Summary

The provider-selection transfer logic now retains compatible legacy selections and treats any migrated instance for a provider driver as authoritative, preventing disabled migrated providers from being replaced by an enabled legacy fallback.

Confidence Score: 5/5

Safe to merge.

The current implementation fully addresses both previously reported provider-selection behaviors: legacy selections resolve through their provider driver, and the legacy fallback is skipped whenever migrated instances for that driver exist.

Reviews (3): Last reviewed commit: "fix(shared): respect disabled migrated p..." | Re-trigger Greptile

Comment thread packages/shared/src/serverSettings.ts Outdated
@leoisadev1 leoisadev1 changed the title fix(settings): match text generation models by provider identity feat(shared): map text generation models by provider identity Sep 14, 2026
Comment thread packages/shared/src/serverSettings.ts
@leoisadev1
leoisadev1 merged commit 17581f8 into main Sep 14, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the fix/text-generation-model-identity branch September 14, 2026 03:42
@github-actions github-actions Bot mentioned this pull request Sep 14, 2026

This branch was successfully deployed

1 active deployment
Preview — bfa22fd1 Deployed Sep 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant