Skip to content

[Bug]: Can deploy an LLM provider with a non-existing policy or a non-existing policy version #2466

Description

@npamudika

Please select the area the issue is related to

Area/Management (Management API or Management Portal UI), Area/Policies (Policies, Policy Hub, Policy Engine etc)

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)

Description

The server accepts a policy reference with a non-existent version or a non-existent policy, deploys it successfully with no error, but the gateway silently drops the unresolvable policy. The deployment shows DEPLOYED even though the intended rate limiting is not active. There is no failure signal at any step.

The gateway controller logs an ERROR when it fails to resolve the policy, but that error is never propagated back to the platform-api to update the deployment status/statusReason. From the operator's perspective, the deployment looks healthy while the intended policy is simply not running.

Logs the following in the Gw controller during the deployment.

gateway-controller-1  | 2026/07/06 07:16:09 ERROR Failed to resolve policy version for API-level policy policy_name=basic-ratelimit error="policy 'basic-ratelimit' major version 'v999' not found in loaded policy definitions"

gateway-controller-1  | 2026/07/06 07:19:24 ERROR Failed to resolve policy version for API-level policy policy_name=this-policy-does-not-exist error="policy 'this-policy-does-not-exist' major version 'v1' not found in loaded policy definitions"

Steps to Reproduce

Create an LLM provider as below using a non-existent policy version and deploy it to a GW.

curl -sk -X PUT https://localhost:9243/api/am/admin/v1/llm-providers/new-llm-provider \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -d '{
    "name": "new-llm-provider",
    "apiType": "openai",
    "endpoint": "https://api.openai.com/v1",
    "globalPolicies": [
      {
        "name": "basic-ratelimit",
        "version": "v999"
      }
    ]
  }'

Severity Level of the Issue

Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area/ManagementAny issues related to Management API or Management Portal UIArea/PoliciesIssues related to any policy, policy hub, policy engine etcAspect/APIAPI definitions, contracts, OpenAPI, interfacesSeverity/MajorType/Bug

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions