Fix: Use scoped provider lookup in inference set#22
Merged
Conversation
The provider lookup in upsert_cluster_inference_route used get_message_by_name directly, which fails for per-user providers stored under scoped keys (e.g. 'owner-uuid/claude'). Switch to resolve_scoped_name which tries the scoped key first then falls back to global, matching the pattern used in the provider gRPC service. Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
8ef55c7 to
0f7113b
Compare
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
openshell inference set --provider <name>upsert_cluster_inference_routewas using directget_message_by_namewhich fails for per-user providers stored under scoped keys (e.g.owner-uuid/claude)resolve_scoped_namewhich tries the user's scoped key first, then falls back to the global name — matching the resolution pattern already used in the provider gRPC serviceRoot cause
PR #21 introduced per-user inference routes but the provider lookup inside
inference setstill used the raw name. Per-user providers (from PR #19) are stored as<owner>/<name>, so a direct lookup for"claude"returns nothing.Test plan
openshell provider create --name claude ...as bob → succeedsopenshell inference set --provider claude --model ... --no-verifyas bob → succeeds (was broken)inference setstill works with shared providersAssisted-By: Claude Code