fix(admin): show the harness/model card at every accepted scope - #593
Open
yzxcj797 wants to merge 1 commit into
Open
fix(admin): show the harness/model card at every accepted scope#593yzxcj797 wants to merge 1 commit into
yzxcj797 wants to merge 1 commit into
Conversation
The runtime and base-model resources are target: "any" and the scope-config payload already carries baseModelOptions/modelsByHarness/ runtime for channels and projects, but the admin UI gated the card on an org: prefix -- an admin wanting a particular room on a particular model had to call the API by hand (yc-software#589). Drop the org: prefix from showBaseModel only; approved-harnesses stays org-gated (it is target: "org" by design), as do the other org-scoped resources in the same block.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #589.
Root cause
Purely a UI gate: the
runtime(andbase-model) resources are declaredtarget: "any"inadmin-resources.ts, andscope-config.tsalready returnsbaseModelOptions/modelsByHarness/runtimefor every scope — which is exactly why the issue's API round-trip works on a channel while the card stays hidden. The one-line culprit:Fix
Drop the
org:prefix fromshowBaseModel— the harness/model card now renders at every scope the resource accepts, and per-channel/per-project model selection happens through the same form as org-level.Deliberately untouched, because their backends are genuinely org-scoped:
approved-harnesses(target: "org", org-wide by design),No backend change needed.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.