Skip to content

fix(provider): add overrides for AIhubmix compatibility#143

Merged
code-JDS merged 4 commits intodevfrom
fix/provider
Apr 7, 2026
Merged

fix(provider): add overrides for AIhubmix compatibility#143
code-JDS merged 4 commits intodevfrom
fix/provider

Conversation

@code-JDS
Copy link
Copy Markdown
Collaborator

@code-JDS code-JDS commented Apr 6, 2026

Issue for this PR

Closes #139

Type of change

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

What does this PR do?

This PR fixes AIhubmix compatibility issues in the provider integration.

AIhubmix currently cannot be used reliably: some models fail with request errors, while others produce repeated output. To address that, this change adds provider-specific overrides so AIhubmix can use the expected SDK package and API endpoint instead of relying only on the upstream provider metadata.

How did you verify your code works?

The branch was pushed successfully, and the repository's pre-push typecheck passed during git push.

Screenshots / recordings

No screenshot or recording is needed.

Checklist

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

catmeow123456 and others added 4 commits April 6, 2026 22:38
…rides

- Replace globalSDK.client.global.dispose() with globalSync.bootstrap()
  when disconnecting a provider, matching the pattern used on connect
- Add PROVIDER_OVERRIDES mechanism for providers whose upstream npm
  packages are incompatible with bundled AI SDK versions (aihubmix)
…rove provider connect dialog"

This reverts commit affa01b.
Introduce a `PROVIDER_OVERRIDES` map to handle providers whose upstream
npm packages are incompatible with the bundled AI SDK versions. When a
provider is listed in the overrides, its `npm` package and `api` URL
will be substituted at model info resolution time, falling back to the
standard provider values if no override is defined.

Add `aihubmix` as the first override, redirecting it to use the bundled
`@ai-sdk/openai-compatible` package with `https://aihubmix.com/v1` as
the API endpoint, bypassing its incompatible upstream SDK.
@code-JDS code-JDS requested a review from yqmaphy as a code owner April 6, 2026 17:08
@code-JDS code-JDS merged commit 53602d8 into dev Apr 7, 2026
9 checks passed
@code-JDS code-JDS deleted the fix/provider branch April 7, 2026 06:35
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.

aihubmix provider 无法对话以及点断开连接

3 participants