Skip to content

Fix: Use scoped provider lookup in inference set#22

Merged
pdettori merged 1 commit into
mvp-v2from
fix/inference-scoped-provider-lookup
Jun 23, 2026
Merged

Fix: Use scoped provider lookup in inference set#22
pdettori merged 1 commit into
mvp-v2from
fix/inference-scoped-provider-lookup

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

  • Fix 'provider not found' error when non-admin users run openshell inference set --provider <name>
  • The provider lookup in upsert_cluster_inference_route was using direct get_message_by_name which fails for per-user providers stored under scoped keys (e.g. owner-uuid/claude)
  • Switch to resolve_scoped_name which tries the user's scoped key first, then falls back to the global name — matching the resolution pattern already used in the provider gRPC service

Root cause

PR #21 introduced per-user inference routes but the provider lookup inside inference set still 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

  • CI passes (Rust build + clippy + tests)
  • openshell provider create --name claude ... as bob → succeeds
  • openshell inference set --provider claude --model ... --no-verify as bob → succeeds (was broken)
  • Admin inference set still works with shared providers

Assisted-By: Claude Code

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>
@pdettori pdettori force-pushed the fix/inference-scoped-provider-lookup branch from 8ef55c7 to 0f7113b Compare June 23, 2026 15:51
@pdettori pdettori merged commit 7784be8 into mvp-v2 Jun 23, 2026
8 of 10 checks passed
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