Skip to content

fix: deduplicate configured model badges - #3

Closed
webtecnica wants to merge 1 commit into
masterfrom
fix/6221-dedup-model-badges
Closed

fix: deduplicate configured model badges#3
webtecnica wants to merge 1 commit into
masterfrom
fix/6221-dedup-model-badges

Conversation

@webtecnica

Copy link
Copy Markdown
Owner

Summary

  • Register configured-model badges only for the canonical picker option.
  • Apply the same behavior to both live and static model-catalog builders.
  • Add regression coverage for equivalent routing IDs and fallback badges.

Problem

The catalog registered the same configured model under bare, provider/model, and @provider:model forms. The frontend treated these as separate configured entries in some cases, so one model appeared more than once in the picker.

Changes

  • static/ui.js: Added _isEquivalentConfiguredModelEntry() to compare model entries by normalized key + provider, replacing the simple _existingConfiguredKeys set deduplication. Updated _modelStateForSelect() to resolve provider from the matched option's authoritative data-provider. Updated _ensureModelOptionInDropdown() for provider-qualified fallback rows.
  • tests/test_configured_model_picker_dedup.py: New regression tests for deduplication logic
  • tests/test_configured_model_picker_provider_routing.py: New regression tests for provider-qualified fallback rows
  • tests/test_issue3691_model_picker_show_all.py: Added _isEquivalentConfiguredModelEntry to extracted functions

Closes nesquena#6221

- Register configured-model badges only for canonical picker option
- Apply same behavior to both live and static model-catalog builders
- Add _isEquivalentConfiguredModelEntry to deduplicate by normalized key + provider
- Add regression coverage for equivalent routing IDs and fallback badges
- Handle colon-bearing model IDs in @Provider:model routing

Fixes nesquena#6221
@webtecnica

Copy link
Copy Markdown
Owner Author

Superseded by nesquena#6275 against upstream (nesquena/hermes-webui). This fork-internal PR was created accidentally during the initial push attempt.

@webtecnica webtecnica closed this Jul 18, 2026
webtecnica added a commit that referenced this pull request Aug 13, 2026
…SE relay (nesquena#6961)

Read/surface half of the maintainer's split for PR nesquena#6961 (child approval
routing, nesquena#6943). The resolve half (#1/#2/#3) stays in a follow-up gated on
the agent contract (agent#82009).

#4 (CORE): scope the child->parent cache by canonical state-db/profile path
and only cache positive lookups, so a miss under one profile can no longer
poison another profile's identical child id, and a late state.db write is
picked up on the next lookup. Adds invalidate_child_parent_cache().

#5 (SILENT): use one aggregate projection (own queue + delegated-child
queues, deduped by stable approval id / gateway mirror token) unconditionally
on all three surface paths — sidebar attention summary, /api/approval/pending,
and the SSE initial snapshot — so a parent-with-1 + child-with-1 now reports
count 2 instead of 1.

#6 (SILENT): publish the aggregate parent head/count to the parent's SSE
subscribers whenever an owned child queue changes (submit_pending,
submit_gateway_pending_mirror, retire_gateway_pending_mirror,
resolve_gateway_pending_local, resolve_child_approval_locked), so a pure-SSE
parent consumer sees child enqueue/resolve without waiting for the 1.5s poll.
webtecnica added a commit that referenced this pull request Aug 25, 2026
…SE relay (nesquena#6961)

Read/surface half of the maintainer's split for PR nesquena#6961 (child approval
routing, nesquena#6943). The resolve half (#1/#2/#3) stays in a follow-up gated on
the agent contract (agent#82009).

#4 (CORE): scope the child->parent cache by canonical state-db/profile path
and only cache positive lookups, so a miss under one profile can no longer
poison another profile's identical child id, and a late state.db write is
picked up on the next lookup. Adds invalidate_child_parent_cache().

#5 (SILENT): use one aggregate projection (own queue + delegated-child
queues, deduped by stable approval id / gateway mirror token) unconditionally
on all three surface paths — sidebar attention summary, /api/approval/pending,
and the SSE initial snapshot — so a parent-with-1 + child-with-1 now reports
count 2 instead of 1.

#6 (SILENT): publish the aggregate parent head/count to the parent's SSE
subscribers whenever an owned child queue changes (submit_pending,
submit_gateway_pending_mirror, retire_gateway_pending_mirror,
resolve_gateway_pending_local, resolve_child_approval_locked), so a pure-SSE
parent consumer sees child enqueue/resolve without waiting for the 1.5s poll.
webtecnica added a commit that referenced this pull request Aug 31, 2026
…SE relay (nesquena#6961)

Read/surface half of the maintainer's split for PR nesquena#6961 (child approval
routing, nesquena#6943). The resolve half (#1/#2/#3) stays in a follow-up gated on
the agent contract (agent#82009).

#4 (CORE): scope the child->parent cache by canonical state-db/profile path
and only cache positive lookups, so a miss under one profile can no longer
poison another profile's identical child id, and a late state.db write is
picked up on the next lookup. Adds invalidate_child_parent_cache().

#5 (SILENT): use one aggregate projection (own queue + delegated-child
queues, deduped by stable approval id / gateway mirror token) unconditionally
on all three surface paths — sidebar attention summary, /api/approval/pending,
and the SSE initial snapshot — so a parent-with-1 + child-with-1 now reports
count 2 instead of 1.

#6 (SILENT): publish the aggregate parent head/count to the parent's SSE
subscribers whenever an owned child queue changes (submit_pending,
submit_gateway_pending_mirror, retire_gateway_pending_mirror,
resolve_gateway_pending_local, resolve_child_approval_locked), so a pure-SSE
parent consumer sees child enqueue/resolve without waiting for the 1.5s poll.
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