Deploy LLM providers without upstream authentication - #2955
Deploy LLM providers without upstream authentication#2955lahiruudayakumara wants to merge 2 commits into
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughEmpty API-key authentication is now emitted as disabled authentication ( ChangesLLM provider authentication
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies" Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thushani-Jayasekera
left a comment
There was a problem hiding this comment.
@lahiruudayakumara
I think we should introduce this behaviour during provider creation. If no API key value is provided when the provider is created, we should automatically set the upstream authentication type to None.
Thanks
4f723f9
|
Addressed. Provider creation now automatically sets the upstream authentication type to None when no API key value is provided. If a value is present, API key authentication is preserved. This applies to both main and sandbox upstreams. |
Purpose
LLM providers configured without upstream authentication could not be deployed because the Platform API emitted an incomplete
api-keyauthentication block without a credential. The gateway correctly rejected this configuration withspec.upstream.auth.value: Auth value is required when api-key auth type is set.Resolves #2950.
Goals
noneandotherauthentication types.Approach
During deployment artifact generation, an API-key authentication configuration with an empty credential is now serialized as:
This prevents an invalid
api-keyblock from reaching the gateway. API-key configurations containing a credential continue to be serialized unchanged.A regression unit test verifies that empty API-key authentication is converted to
nonewithout emitting a header or value.No UI changes are included.
User stories
Documentation
N/A — this fixes deployment serialization to match the existing authentication behavior and does not introduce a new user-facing capability or configuration format.
Automation tests
Unit tests
none.none, andotherauthentication continue to pass.Integration tests
Security checks
Samples
N/A — no samples were added or modified.
Related PRs
N/A.
Test environment