본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

NVIDIA Switchyard AI 라우팅 정책 구성 레퍼런스

원문 보기 위키 갱신

NVIDIA Switchyard AI 라우팅 정책 구성 레퍼런스 (NVIDIA Switchyard AI Routing Policy Policy Configuration Reference)

이 문서는 NVIDIA Switchyard AI 라우팅 정책의 설정값을 필드별로 설명하는 구성 레퍼런스예요. Switchyard Decision API 주소와 라우트 이름, 프롬프트 공개 범위(prompt_disclosure) 같은 핵심 옵션의 의미와 기본값을 확인할 수 있어요. 또한 Switchyard가 라우팅 대상으로 선택할 수 있는 타겟(target) 구성 방법과 모델 별칭, 프로토콜 형식 지정 방법도 함께 다뤄요. AI 게이트웨이에서 프롬프트 유출을 막으면서 승인된 모델로만 안전하게 라우팅되도록 설정할 때 참고하면 좋아요.

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "decision_api_url": {
          "type": "string",
          "description": "Full URL of the NVIDIA Switchyard Decision API, including the path `/v1/decision` (for example, `http://switchyard:4000/v1/decision`)."
        },
        "decision_route": {
          "type": "string",
          "description": "Route or profile name configured in Switchyard server (for example, `kong-router`). Sent as the `model` field of the nested decision request."
        },
        "prompt_disclosure": {
          "type": "string",
          "default": "none",
          "enum": [
            "none",
            "latest_user_prompt",
            "recent_message_window",
            "full"
          ],
          "description": "Scope of prompt content disclosed to Switchyard. Under `none`, message content is replaced with `[redacted: N chars]` markers so routing leaks no prompt text. Higher disclosure levels include `latest_user_prompt`, `recent_message_window`, or `full`."
        },
        "targets": {
          "type": "object",
          "description": "Map of pre-approved target configurations that Switchyard decisions are permitted to select. Keys are target IDs (for example, `weak`, `strong`). Decisions naming unlisted targets are refused and fall back to `default_target`.",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "model_alias": {
                "type": "string",
                "description": "Model alias recognized by AI Proxy Advanced when dispatch is `model_alias`. Not used when dispatch is `konnect_model`."
              },
              "model": {
                "type": "string",
                "description": "Underlying LLM model name (for example, `z-ai/glm-5.3`, `google/gemini-3.8-flash`). When dispatch is `konnect_model`, this must match the `name` or an alias of an AI Model entity configured on this AI Gateway. Verified against the decision to prevent model drift."
              },
              "provider": {
                "type": "string",
                "description": "Optional upstream provider identifier for telemetry and logging."
              },
              "protocol": {
                "type": "string",
                "default": "openai_chat",
                "enum": [
                  "openai_chat",
                  "openai_responses",
                  "anthropic_messages"
                ],
                "description": "Protocol format used by the target LLM provider."
              },
              "base_url": {
                "type": "string",
                "description": "Approved base URL for the target, used to assert that Switchyard has not been repointed to an unauthorized upstream."
              },
              "upstream_url": {
                "type": "string",
                "description": "Target upstream base URL, used only when dispatch is set to `upstream` (stub/no-license testing)."
              }
            }
          }
        },
        "default_target": {
          "type": "string",
          "description": "Fallback target key in `targets`, used whenever Switchyard is unreachable, times out, or returns a rejected decision."
        },
        "mode": {
          "type": "string",
          "default": "observe_only",
          "enum": [
            "observe_only",
            "enforce"
          ],
          "description": "Operational mode. `observe_only` evaluates routing without modifying traffic. `enforce` actively applies the decision."
        },
        "dispatch": {
          "type": "string",
          "default": "model_alias",
          "enum": [
            "model_alias",
            "upstream",
            "konnect_model"
          ],
          "description": "Dispatch mechanism. `model_alias` rewrites `body.model` for resolution by AI Proxy Advanced (classic {{site.base_gateway}} plugin path). `upstream` retargets the Service's upstream URL. `konnect_model` looks up the target's `model` as an AI Model entity on this AI Gateway and dispatches natively, without AI Proxy Advanced."
        },
        "inbound_profile": {
          "type": "string",
          "default": "openai_chat",
          "enum": [
            "openai_chat",
            "openai_responses",
            "anthropic_messages"
          ],
          "description": "Inbound protocol profile advertised to the Switchyard Decision API."
        },
        "inbound_endpoint": {
          "type": "string",
          "default": "/v1/chat/completions",
          "description": "Inbound request endpoint matching the advertised profile."
        },
        "session_from_prompt": {
          "type": "boolean",
          "default": false,
          "description": "Derive the session ID from a prompt hash when the client does not supply an `X-Session-Id` header."
        },
        "timeout_ms": {
          "type": "number",
          "default": 300,
          "minimum": 1,
          "maximum": 60000,
          "description": "HTTP timeout, in milliseconds, when querying the Switchyard Decision API. On expiry, requests fall back open to `default_target`."
        },
        "keepalive_timeout": {
          "type": "number",
          "default": 60000,
          "description": "Keepalive idle timeout, in milliseconds, for HTTP connections to Switchyard."
        },
        "keepalive_pool": {
          "type": "integer",
          "default": 10,
          "description": "Maximum idle connections kept in the pool for the Switchyard Decision API client."
        }
      },
      "required": [
        "decision_api_url",
        "decision_route",
        "targets",
        "default_target"
      ]
    }
  }
}

관련 리소스

더 알아보기 (Learn more)

  • 라우팅 대상 모델을 AI 게이트웨이에 엔티티로 등록하는 방법을 확인할 수 있어요 — AI Model entity
  • 이 정책 같은 커스텀 정책을 직접 작성하는 전반적인 방법을 살펴볼 수 있어요 — Custom policies
  • 커스텀 플러그인에서 스트리밍 응답을 처리하는 방법도 함께 보면 도움이 돼요 — Streaming custom plugins