@@ -2120,7 +2120,7 @@ describe("diagnostics-otel service", () => {
|
2120 | 2120 | sessionKey: "session-key", |
2121 | 2121 | sessionId: "session-id", |
2122 | 2122 | provider: "anthropic", |
2123 | | -model: "claude-sonnet-4.6", |
| 2123 | +model: "anthropic/claude-sonnet-4.6", |
2124 | 2124 | usage: { |
2125 | 2125 | input: 100, |
2126 | 2126 | output: 40, |
@@ -2136,7 +2136,9 @@ describe("diagnostics-otel service", () => {
|
2136 | 2136 | const modelUsageOptions = startedSpanOptions("openclaw.model.usage"); |
2137 | 2137 | expect(modelUsageOptions?.attributes?.["gen_ai.operation.name"]).toBe("chat"); |
2138 | 2138 | expect(modelUsageOptions?.attributes?.["gen_ai.system"]).toBe("anthropic"); |
2139 | | -expect(modelUsageOptions?.attributes?.["gen_ai.request.model"]).toBe("claude-sonnet-4.6"); |
| 2139 | +expect(modelUsageOptions?.attributes?.["gen_ai.request.model"]).toBe( |
| 2140 | +"anthropic/claude-sonnet-4.6", |
| 2141 | +); |
2140 | 2142 | expect(modelUsageOptions?.attributes?.["gen_ai.usage.input_tokens"]).toBe(150); |
2141 | 2143 | expect(modelUsageOptions?.attributes?.["gen_ai.usage.output_tokens"]).toBe(40); |
2142 | 2144 | expect(modelUsageOptions?.attributes?.["gen_ai.usage.cache_read.input_tokens"]).toBe(30); |
@@ -2163,8 +2165,8 @@ describe("diagnostics-otel service", () => {
|
2163 | 2165 | runId: "run-1", |
2164 | 2166 | callId: "call-1", |
2165 | 2167 | sessionKey: "session-key", |
2166 | | -provider: "openai", |
2167 | | -model: "gpt-5.4", |
| 2168 | +provider: "anthropic", |
| 2169 | +model: "anthropic/claude-sonnet-4.6", |
2168 | 2170 | api: "openai-completions", |
2169 | 2171 | durationMs: 250, |
2170 | 2172 | }); |
@@ -2193,8 +2195,8 @@ describe("diagnostics-otel service", () => {
|
2193 | 2195 | expect(genAiOperationDuration?.record).toHaveBeenCalledTimes(2); |
2194 | 2196 | expect(genAiOperationDuration?.record).toHaveBeenCalledWith(0.25, { |
2195 | 2197 | "gen_ai.operation.name": "text_completion", |
2196 | | -"gen_ai.provider.name": "openai", |
2197 | | -"gen_ai.request.model": "gpt-5.4", |
| 2198 | +"gen_ai.provider.name": "anthropic", |
| 2199 | +"gen_ai.request.model": "unknown", |
2198 | 2200 | }); |
2199 | 2201 | expect(genAiOperationDuration?.record).toHaveBeenCalledWith(1.25, { |
2200 | 2202 | "gen_ai.operation.name": "generate_content", |
|