Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

When users only have mux-gateway configured (no direct Anthropic/OpenAI API
keys), getPreferredNameModel now tries gateway versions of preferred models.

The fix:

  1. After trying each preferred model directly (anthropic:claude-haiku-4-5),
    also try the gateway version (mux-gateway:anthropic/claude-haiku-4-5)
  2. Still prefers direct access when available for lower latency

This ensures auto-naming works for gateway-only users while maintaining
optimal performance for users with direct API keys.


Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

@ammar-agent ammar-agent force-pushed the auto-naming-3xkk branch 2 times, most recently from e06746e to c15ebff Compare December 20, 2025 18:02
When users only have mux-gateway configured (no direct Anthropic/OpenAI API
keys), auto-naming now works by trying gateway versions of preferred models.

The fix uses clean separation of concerns:
- Frontend builds preferredModels list with both direct and gateway formats
- Backend just tries each model in order via findAvailableModel()
- No gateway awareness needed in backend

This ensures auto-naming works for gateway-only users while maintaining
optimal performance for users with direct API keys.

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
@ammario ammario merged commit 706b284 into main Dec 20, 2025
20 checks passed
@ammario ammario deleted the auto-naming-3xkk branch December 20, 2025 18:28
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