Skip to content

fix(proxy): account-aware Gemini Pro remapping with dynamic fallback#2253

Open
Oldcircle wants to merge 3 commits intolbjlaq:mainfrom
Oldcircle:feat/gcli-dynamic-remap-fallback-pr
Open

fix(proxy): account-aware Gemini Pro remapping with dynamic fallback#2253
Oldcircle wants to merge 3 commits intolbjlaq:mainfrom
Oldcircle:feat/gcli-dynamic-remap-fallback-pr

Conversation

@Oldcircle
Copy link
Copy Markdown
Contributor

@Oldcircle Oldcircle commented Mar 4, 2026

Summary

  • keep concrete Gemini Pro model IDs as pass-through in built-in mapping (no forced cross-version rewrite)
  • add account-aware dynamic model rewrite fallback for Gemini 3/3.1 Pro family
  • apply dynamic rewrite in both OpenAI-compatible and Gemini-native handlers
  • document current remapping behavior in docs/model-remapping-logic.md

Why

  • request model should be preserved when that model is available for the selected account
  • fallback remapping should only happen when the requested model is not available

Files

  • src-tauri/src/proxy/common/model_mapping.rs
  • src-tauri/src/proxy/token_manager.rs
  • src-tauri/src/proxy/handlers/openai.rs
  • src-tauri/src/proxy/handlers/gemini.rs
  • src-tauri/src/proxy/mappers/common_utils.rs
  • docs/model-remapping-logic.md

Validation

  • cargo check passed
  • local smoke request confirmed gemini-3-pro-high remains gemini-3-pro-high when available

Oldcircle and others added 3 commits March 2, 2026 16:07
…i CLI support

Comprehensive update including proxy handler improvements (Claude/OpenAI/Gemini),
token manager overhaul, enhanced account management UI, quota system upgrades,
security middleware enhancements, and Gemini CLI integration support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge upstream changes into main:
- Normalized rate limit locking mechanism
- Fix thinkingLevel injection in Claude/OpenAI mappers
- Fix tool search functionality
- TypeScript compilation fixes (AccountErrorDialog, NavLogo)
- Update docker-compose.yml
- Add model_specs.json resource file

Preserve our custom changes:
- Gemini CLI support and enhanced proxy handlers
- Enhanced account management UI
- Improved quota system
- Dynamic model remapping foundation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Oldcircle Oldcircle force-pushed the feat/gcli-dynamic-remap-fallback-pr branch from bd04df4 to bc18c2d Compare March 8, 2026 11:26
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