فهرست منبع

zen: new inference

Frank 2 ماه پیش
والد
کامیت
7a17925495
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      packages/console/app/src/routes/zen/util/handler.ts

+ 10 - 0
packages/console/app/src/routes/zen/util/handler.ts

@@ -215,6 +215,16 @@ export async function handler(
         body: reqBody,
       })
 
+      if (providerInfo.id.startsWith("console.")) {
+        const resEndpointId = res.headers.get("x-opencode-endpoint-id")
+        const resEndpointModelId = res.headers.get("x-opencode-upstream-model-id")
+        if (resEndpointId && resEndpointModelId)
+          logger.metric({
+            provider: resEndpointId,
+            "provider.model": resEndpointModelId,
+          })
+      }
+
       if (res.status !== 200) {
         logger.metric({
           "llm.error.code": res.status,