Skip to content

feat(meta): hide catalog models an OAuth model alias takes over - #9

Open
ntindle wants to merge 1 commit into
mainfrom
feat/muse-hide-aliased-models
Open

ntindle wants to merge 1 commit into
mainfrom
feat/muse-hide-aliased-models

Conversation

@ntindle

@ntindle ntindle commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Why

Nick, 2026-10-13: "I want all actions through contributor because of its much higher limits", and the base models should leave the picker.

Earlier that night an agent started eight PR reviews on muse-wonder-1.0 (Standard mode) through the Muse bridge, and the Meta subscription's 5-hour window ran out within minutes. Every Muse client picks its model from the catalog this proxy relays, so that catalog is where the base models have to go.

What

An oauth-model-alias entry on the meta channel whose alias is a model Meta lists already takes that ID over: execution sends the request as the alias's model. With this change, the relayed /muse-code/models catalog also marks such an entry is_hidden, when the model the alias runs is in the same catalog.

  • is_hidden is Meta's own flag. Muse already hides muse-image-1.0 with it, and T3 and the Muse bridge both leave that model out of their lists.
  • Hiding rather than removing the entry keeps the ID resolvable. A client that names muse-wonder-1.0 explicitly (a pinned config, an open session) still gets an answer, and the alias runs it as muse-wonder-1.0-contributor.
  • While the channel has an alias, If-None-Match is not sent to Meta. Meta's Etag and Last-Modified are dropped when the catalog was changed, so a client never keeps a 304 for a list it was not given.
  • No new setting. A Meta API key under meta-api-key gets no OAuth model alias, so its catalog is left alone, as execution already does.

The configuration that pairs with it, live on tower since 2026-10-13 01:29 Pacific:

oauth:
    model-alias:
        meta:
            - name: "muse-wonder-1.0-contributor"
              alias: "muse-wonder-1.0"
              fork: true
            - name: "muse-spark-1.3-contributor"
              alias: "muse-spark-1.3"
              fork: true
            - name: "muse-spark-1.2-contributor"
              alias: "muse-spark-1.2"
              fork: true

fork: true matters: without it the alias would replace the -contributor IDs in the login's model list, and those are every machine's default.

Tests

On fate, Go 1.26.9:

  • gofmt -l internal/api/ and go vet ./internal/api/ are clean.
  • go test ./internal/api/ -run 'TestForkMuseCode|TestForkHideShadowed': 8 tests pass, 4 of them new:
    • hiding an alias-shadowed model;
    • leaving the catalog alone with no alias, with an alias for another channel, and on a Meta API key;
    • a credential's own alias winning over the global one;
    • bodies the filter does not read.
  • With the hide step switched off, TestForkMuseCodeRelayHidesModelsAnAliasTakesOver fails (is_hidden = false, Etag still relayed).
  • .github/scripts/fork-check.sh exits 0. Its advisory run reports TestResponsesInterruptStopsHTTPUpstream and TestResponsesLateInterruptDoesNotPoisonNextCreate in sdk/api/handlers/openai. That package does not import internal/api, and on this commit they fail 8 and 1 of 20 runs on their own.

Deploy

Merging builds :latest. After the apply, Muse clients pick up the hidden flags at their next catalog read. Until then, the aliases already send base IDs as contributor.

🤖 Generated with Claude Code

An oauth-model-alias entry on the meta channel whose alias is a model Meta
lists sends every request for that ID to the alias's model. The relayed
/muse-code/models catalog now marks such an entry is_hidden when the
model the alias runs is in the same catalog, so Muse's picker, T3 and the
Muse bridge offer only the model a request reaches. Muse still resolves a
hidden ID named explicitly, and the alias runs it.

With aliases from each Muse model to its -contributor twin, every Muse
request runs in Contributor mode.

While the channel has an alias, If-None-Match is not passed to Meta, and
Meta's Etag and Last-Modified are dropped when the catalog changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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