---
name: openai-sdk-on-aws-bedrock
bindings:
  north_tcp_server:
    type: tcp
    kind: server
    options:
      host: 0.0.0.0
      port: 7161
    exit: north_http_server
  north_http_server:
    type: http
    kind: server
    exit: north_llm_server
  #region llm_server
  north_llm_server:
    type: llm
    kind: server
    options:
      dialect: openai
    exit: north_llm_proxy
  #endregion llm_server
  #region llm_proxy
  north_llm_proxy:
    type: llm
    kind: proxy
    routes:
      - when:
          - model:
              - amazon.*
              - anthropic.*
              - us.amazon.*
              - us.anthropic.*
        exit: south_llm_client_bedrock
  #endregion llm_proxy
  #region llm_client
  south_llm_client_bedrock:
    type: llm
    kind: client
    options:
      dialect: aws-bedrock
      server: https://bedrock-runtime.us-east-1.amazonaws.com
    exit: south_http_client_bedrock
  south_http_client_bedrock:
    type: http
    kind: client
    exit: south_tls_client_bedrock
  south_tls_client_bedrock:
    type: tls
    kind: client
    options:
      sni:
        - bedrock-runtime.us-east-1.amazonaws.com
    exit: south_tcp_client_bedrock
  south_tcp_client_bedrock:
    type: tcp
    kind: client
    options:
      host: bedrock-runtime.us-east-1.amazonaws.com
      port: 443
  #endregion llm_client
