🐛 Fix Ampcode Smart Model Mapping (Opus 4.6)
Fixes an issue where Ampcode Smart agent requests used Ampcode credits instead of routing through the configured proxy provider.
Root Cause
Ampcode sends the model ID as claude-opus-4-6 (without date suffix), but ProxyPal was generating the model mapping with claude-opus-4-6-20260205 (with date suffix). The mismatch caused CLIProxyAPIPlus to skip the mapping and forward requests directly to Ampcode upstream.
Fixes
- Model ID corrected: Smart slot
fromModelchanged fromclaude-opus-4-6-20260205→claude-opus-4-6to match Ampcode's actual format - Auto-migration: Existing configs with the date-suffixed ID will be automatically migrated on app launch
- YAML payload fix: Fixed escaped quotes (
\") inside a Rust raw string that produced malformed YAML in thepayloadsection ofproxy-config.yaml
Auto-Migration
Users who previously configured Opus 4.6 mappings don't need to do anything — the migration runs automatically on startup and updates the saved config.
Technical Details
| Component | Change |
|---|---|
src/lib/tauri.ts
| fromModel: claude-opus-4-6-20260205 → claude-opus-4-6
|
src/lib/tauri.ts
| Added migration: claude-opus-4-6-20260205 → claude-opus-4-6
|
src/stores/app.ts
| Auto-migration on initialize + auto-save |
src-tauri/src/lib.rs
| Fixed escaped quotes in payload YAML template |
Full Changelog: v0.3.105...v0.3.106