Skip to content

refactor(provider): split transform by family#21955

Open
Mayhem50 wants to merge 1 commit intoanomalyco:devfrom
Mayhem50:Mayhem50/refactor-provider-transform-by-family
Open

refactor(provider): split transform by family#21955
Mayhem50 wants to merge 1 commit intoanomalyco:devfrom
Mayhem50:Mayhem50/refactor-provider-transform-by-family

Conversation

@Mayhem50
Copy link
Copy Markdown

Issue for this PR

Follow-up refactor around #21237

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This refactors ProviderTransform from a single transform.ts file into a structured transform/ module with a dispatching index.ts, shared helpers, and family-specific implementations under transform/family/.

The refactor keeps the public ProviderTransform API intact while making the provider logic easier to follow and evolve:

  • provider families are resolved centrally in kind.ts
  • normalize and cache are dispatched through the family implementation
  • provider/model-specific variants logic now lives in family files instead of the orchestrator
  • the previous catch-all misc bucket was split into explicit families (generic, groq, xai, venice, opencode, sap, mistral, custom)
  • the existing Azure gpt-5 guard for reasoningSummary / textVerbosity is preserved in the refactored structure

How did you verify your code works?

  • Ran bun test test/provider/transform.test.ts test/session/llm.test.ts test/session/prompt.test.ts test/provider/provider.test.ts
  • Ran bun typecheck

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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