> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Router 拓扑与依赖图接口

> 获取咏唱引擎 ROUTER 中入口点到配方与 provider 的实时依赖图映射。

拓扑接口暴露当前的路由依赖图。调用它可查看入口点如何解析到配方，而配方又如何指向 provider 与模型。这有助于你调试路由行为并理解配置影响。

该响应为只读，任何已认证调用者均可访问。

## 接口

```http theme={null}
GET /v1/router/topology
```

## 认证

使用会话 Cookie 认证，或携带 `Authorization: Bearer <api-key>`。

## 响应

<ResponseField name="graph" type="object">
  包含依赖图的根对象。

  <Expandable title="属性">
    <ResponseField name="entrypoints" type="array">
      依赖图中的入口点节点列表。

      <Expandable title="items">
        <ResponseField name="id" type="string">
          唯一的入口点标识符。
        </ResponseField>

        <ResponseField name="recipe" type="string">
          此入口点路由到的配方。
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="recipes" type="array">
      配方节点及其目标 provider 的列表。

      <Expandable title="items">
        <ResponseField name="id" type="string">
          唯一的配方标识符。
        </ResponseField>

        <ResponseField name="type" type="string">
          配方类型。取值：`semantic`、`agent`。
        </ResponseField>

        <ResponseField name="providers" type="array">
          此配方选定的 provider。

          <Expandable title="strings" />
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="providers" type="array">
      provider 节点列表。

      <Expandable title="items">
        <ResponseField name="id" type="string">
          唯一的 provider 标识符。
        </ResponseField>

        <ResponseField name="models" type="array">
          此 provider 所服务的模型名称。

          <Expandable title="strings" />
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "graph": {
      "entrypoints": [
        { "id": "default-chat", "recipe": "semantic-router" }
      ],
      "recipes": [
        {
          "id": "semantic-router",
          "type": "semantic",
          "providers": ["openai", "anthropic"]
        }
      ],
      "providers": [
        {
          "id": "openai",
          "models": ["gpt-4o", "gpt-4o-mini"]
        },
        {
          "id": "anthropic",
          "models": ["claude-3-5-sonnet-20241022"]
        }
      ]
    }
  }
  ```
</ResponseExample>
