Skip to content

feat(providers): add connection model_map and notes with dual model usage tracking - #18395

Open
Junior-HJ wants to merge 3 commits into
cheaper-inference:release/v3.8.53from
Junior-HJ:feat/connection-model-map-and-notes
Open

Junior-HJ wants to merge 3 commits into
cheaper-inference:release/v3.8.53from
Junior-HJ:feat/connection-model-map-and-notes

Conversation

@Junior-HJ

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #17219

Summary

Port model mapping and custom notes support at provider connection level from sub2api:

  • Add notes (free-form text) and model_map (JSON mapping requested model -> actual model) to provider_connections.
  • Implement model resolution in request dispatch pipeline and provider execution fallback/cooldown flows.
  • Implement dual model accounting (requested_model vs actual_model) across usage_history and call_logs, ensuring usage/pricing calculations run on actual_model.
  • Add UI controls to EditConnectionModal to edit notes and modelMap (key-value / JSON input).

Migrations

  • 215_connection_notes_model_map.sql
  • 216_usage_actual_model.sql

Validation

  • npm run check:migration-numbering passing.
  • npm run typecheck:core passing.
  • Unit tests passing:
    • tests/unit/db/connection-notes-model-map.test.ts
    • tests/unit/db/usage-actual-model.test.ts
    • tests/unit/services/connection-model-map.test.ts
    • tests/unit/providers/connection-model-map-input.test.ts
    • tests/unit/dashboard/edit-connection-modal-notes-model-map.test.tsx

@Junior-HJ
Junior-HJ force-pushed the feat/connection-model-map-and-notes branch 2 times, most recently from 14fc2f7 to 6188745 Compare October 28, 2026 15:40
@Junior-HJ
Junior-HJ force-pushed the feat/connection-model-map-and-notes branch from 6188745 to 5b7fd51 Compare October 28, 2026 17:46

This branch has not been deployed

No deployments
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