HERMES-GIELIE/api
happy5318 d6164cdadb Fix _norm_model_id to properly strip provider prefixes
The _norm_model_id function was using split(':', 1)[1] which only removed
the first colon-separated segment, leaving provider names in the normalized
model ID. For example, '@custom:jingdong:GLM-5' became 'jingdong:glm.5'
instead of 'glm.5'.

This caused the default model injection check to fail, resulting in a
duplicate 'Default' group being added to the model list even when the
model already existed with a provider prefix.

Changes:
- Use split(':')[-1] to get the last segment after all colons
- Use split('/')[-1] consistently for slash-separated paths
- Replace local _norm lambda with _norm_model_id function call

Fixes duplicate Default group appearing in model dropdown when using
custom providers with @provider:model ID format.
2026-05-02 13:40:38 +08:00
..
__init__.py
agent_sessions.py release: apply Opus SHOULD-FIX 1+2 + add #1372 manual-cron persistence 2026-04-30 23:17:54 +00:00
auth.py v0.50.258: Opus follow-up — fix multi-param redirect-encoding bug + CHANGELOG 2026-05-01 21:30:10 +00:00
background.py
clarify.py feat(clarify): SSE long-connection for real-time clarify notifications (#1355) 2026-04-30 21:32:51 +00:00
commands.py
config.py Fix _norm_model_id to properly strip provider prefixes 2026-05-02 13:40:38 +08:00
extensions.py Opus pre-release follow-ups for PR #1445 2026-05-02 03:49:40 +00:00
gateway_watcher.py release: v0.50.241 (#1293) 2026-04-29 19:54:07 -07:00
helpers.py v0.50.255: Opus follow-ups (4 fixes) + CHANGELOG 2026-05-01 17:19:53 +00:00
metering.py
models.py Merge PR #1402 from bergeouss: P2 improvements — cron history, toolsets per session, Codex OAuth 2026-05-01 18:20:05 +00:00
oauth.py v0.50.257: 4 Opus pre-release follow-ups + CHANGELOG + test fixes for #1415 2026-05-01 18:30:41 +00:00
onboarding.py
profiles.py fix(cancel-stream): rename tool_calls to _partial_tool_calls (Opus MUST-FIX) 2026-04-30 23:43:23 +00:00
providers.py fix: TTS toggle CSS specificity collision (#1409) + Ollama env var bleed (#1410) 2026-05-01 17:14:51 +00:00
rollback.py v0.50.255: Opus follow-ups (4 fixes) + CHANGELOG 2026-05-01 17:19:53 +00:00
routes.py v0.50.264 polish followups: i18n parity + assistant-output readability 2026-05-02 04:19:28 +00:00
session_ops.py Show profile home in /status command (refs #463) (#1380) 2026-05-01 04:46:37 +00:00
startup.py fix: P0 hotfixes — API regression, code block parser, chmod override 2026-05-01 12:10:48 +00:00
state_sync.py
streaming.py v0.50.259: Opus pre-release follow-up — close _session_db on LRU eviction + CHANGELOG + 5 regression tests 2026-05-01 22:42:53 +00:00
terminal.py
updates.py
upload.py Merge remote-tracking branch 'refs/remotes/pr/1229' into stage/batch-v0.50.238 2026-04-29 15:17:57 +00:00
workspace.py