Skip to content

Conversation

@DeJeune
Copy link
Collaborator

@DeJeune DeJeune commented Jan 1, 2026

Continued from #12023
refactor: type safety

@DeJeune DeJeune marked this pull request as draft January 1, 2026 08:12
@DeJeune DeJeune marked this pull request as ready for review January 1, 2026 15:53
DeJeune and others added 2 commits January 2, 2026 00:14
…ExtensionConfig

Use TypeScript discriminated union types to prevent using both `create` and `import`
options simultaneously in ProviderExtensionConfig at compile time. This replaces runtime
validation with type-level enforcement.

Changes:
- Split ProviderExtensionConfig into a union of ProviderExtensionConfigWithCreate and ProviderExtensionConfigWithImport
- Extract shared properties into ProviderExtensionConfigBase
- Remove runtime validation checks that are now handled by the type system
- Clean up unused import in HubProvider.test.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Move test utilities from src/__tests__/ to test_utils/
- Fix ModelResolver tests for simplified API (2 params instead of 4)
- Fix generateImage/generateText tests with proper vi.fn() mocks
- Fix ExtensionRegistry.parseProviderId to check variants before aliases
- Add createProvider method overload for dynamic provider IDs
- Update ProviderExtension tests for runtime validation behavior
- Delete outdated tests: initialization.test.ts, extensions.integration.test.ts, executor-resolveModel.test.ts
- Remove 3 skipped tests for removed validate hook
- Add HubProvider.integration.test.ts
- All 359 tests passing, 0 skipped

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@DeJeune DeJeune changed the base branch from migrate/v6 to main January 1, 2026 19:17
@DeJeune DeJeune changed the base branch from main to migrate/v6 January 2, 2026 00:30
@DeJeune DeJeune requested a review from 0xfullex as a code owner January 2, 2026 00:30
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.

2 participants