Skip to content

feat(api): GET /v1/combos should flag pinned accounts without leaking connectionId #10968

Closed

Description

@RaviTharuma

Bug Description

GET /v1/combos (API-key surface, #2300) projects only kind / model / providerId / comboName. connectionId is stripped on purpose and must stay stripped.

Consequence for operators who pin two accounts of the same provider (fill-first / priority failover):

"models": [
  { "kind": "model", "model": "jina-ai/some-embed", "providerId": "jina-ai" },
  { "kind": "model", "model": "jina-ai/some-embed", "providerId": "jina-ai" }
]

Clients cannot tell “two pinned wallets” from “the same step duplicated”. Dashboard already shows acct <8-char> (ComboControlCenterClient). The public catalog has no equivalent boolean.

This is not a request to leak connectionId. A boolean (or count) is enough.

Steps to Reproduce

  1. Create a combo with two model steps, same providerId + model, different pinned connectionIds.
  2. GET /v1/combos with a normal API key.
  3. Compare to the dashboard combo editor.

Expected Behavior

Public step includes something like accountPinned: true (or pinnedAccountCount on the combo) without the UUID.

Duplicate-looking steps with accountPinned: true are then distinguishable from a true duplicate of an unpinned step.

Actual Behavior

Two pinned accounts collapse to two identical {kind, model, providerId} objects. Integrations (OpenClaw, OpenCode plugin) conclude the combo has no failover.

Environment

  • src/app/api/v1/combos/projectCombo.ts (projectComboStep)
  • tests/unit/v1-combos-projection.test.ts currently asserts connectionId is dropped — keep that assertion
  • Related: #2300, #3979

Additional Context

No account ids or hostnames. Prefer a boolean over exposing even an 8-char prefix on this public route.

Activity

  1. diegosouzapw commented on Aug 21, 2026

    @diegosouzapw
    Collaborator

    Hi @RaviTharuma! Grounded and feasible — this is a clean XS addition.

    Verified in the codebase: projectComboStep (src/app/api/v1/combos/projectCombo.ts) already reads raw step fields into PublicComboStep and deliberately drops connectionId; the raw step does carry a connectionId when an account is pinned (used by cleanupComboConnectionRefs in src/lib/db/combos.ts). So deriving accountPinned: boolean from a non-empty raw connectionId is a few lines and leaks nothing — no UUID, not even an 8-char prefix. Backward compatible (additive key).

    Keep the existing connectionId-drop assertion in tests/unit/v1-combos-projection.test.ts green and add: accountPinned true for a pinned raw step, false for an unpinned one, and absent/false for combo-ref / malformed steps. Prefer the per-step accountPinned boolean over pinnedAccountCount on the combo — it directly disambiguates the duplicate-looking steps and matches the dashboard's per-step acct display.

    Status: ✅ Accepted — queued for implementation

  2. added a commit that references this issue on Aug 22, 2026
    8a3161d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions