Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

Add new mux-gateway provider that uses createGateway from the AI SDK.

Configuration

In ~/.mux/providers.jsonc:

{
  "mux-gateway": {
    "couponCode": "your-coupon-code-here"
  }
}

Then use models like mux-gateway:claude-3-5-sonnet-20241022.

Changes

  • Add importMuxGateway() and registry entry in providers.ts
  • Add mux-gateway handler in aiService.ts using hardcoded baseURL
  • Add couponCodeSet field to settings UI (no baseUrl field exposed)
  • Update schemas and types for the new provider

Generated with mux

Add new mux-gateway provider that uses createGateway from the AI SDK.
Uses couponCode as the API key with hardcoded baseURL pointing to
https://gateway.mux.coder.com/api/v1/ai-gateway/v1/ai

- Add importMuxGateway function and registry entry
- Add mux-gateway handler in createModel()
- Add couponCode field in settings UI (no apiKey/baseUrl)
- Auto-add default models on first couponCode setup:
  - anthropic/claude-sonnet-4-5-20250514
  - anthropic/claude-opus-4-5-20250514
  - openai/gpt-5.1
  - openai/gpt-5.1-codex

_Generated with mux_
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 28, 2025
Merged via the queue into main with commit 580111d Nov 28, 2025
11 of 13 checks passed
@ibetitsmike ibetitsmike deleted the mux-gateway-provider branch November 28, 2025 08:12
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