Skip to content

Headless: emit per-step token usage in the AG-UI stream (desktop status bar) #1253

Description

Summary

infer headless --format ag-ui only carries token usage in the terminal RUN_FINISHED event's result object, so any client that renders live usage stats stays stale for the whole run and then jumps in one step at the end. The desktop status bar (in, out, cached, Context %, cost) needs this stream to carry usage as the run progresses.

Tracked from inference-gateway/desktop#305; the desktop side (parser arm + reducer) is already prepared in inference-gateway/desktop#306 and is inert until this emission lands.

Request

Emit a per-step usage CUSTOM event from aguiEncoder (internal/platform/render/agui.go), mirroring the established extension points (agent_status, background_tasks, queued_message):

  • Event: {"type":"CUSTOM","name":"token_usage","value":{...}}
  • value: the same stats object the RUN_FINISHED result already carries - inputTokens, outputTokens, cacheReadTokens, totalToolCalls, lastInputTokens, contextWindow, cost - as cumulative session totals.
  • Cadence: after each LLM step/turn completes, before the tool loop continues, so the numbers climb while tool calls run.

Desktop contract (already implemented)

  • backend/src/agent.rs maps the CUSTOM token_usage value onto AgentEvent::TokenUsage with the same fields the RUN_FINISHED result uses; a missing/non-object value falls through harmlessly.
  • The transcript reducer overwrites its running usage with each TokenUsage event, so the authoritative totals win.

Verification

  • Desktop parser tests: test_parse_custom_token_usage_streams_usage_mid_run, test_parse_custom_token_usage_without_value_is_raw (desktop PR 306).
  • CLI side: one emission call in the AG-UI encoder plus its render test.

Activity

  1. moved this to Todo in 2026on Sep 20, 2026
  2. added theissue type on Sep 20, 2026
  3. added
    enhancement
    on Sep 20, 2026
  4. changed the issue type fromtoon Sep 20, 2026
  5. edenreich commented on Sep 20, 2026

    @edenreich
    Contributor

    @infer Can you fix this? use /ponytail:ponytail

  6. inference-gateway-maintainer commented on Sep 20, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Model: ollama_cloud/glm-5.3-flash · View Job

    Todos

    • Set up branch and add issue to project board
    • Trace how stats/RUN_FINISHED result is built and how CUSTOM events are wired
    • Emit per-step token_usage CUSTOM event in aguiEncoder
    • Add render test for the emission
    • Run checks, commit, push, open draft PR
    • Update board to QA, docs ticket if needed

    Pull Request

    #1254

    ✅ Infer Result: Success

    All done. Final verification passed: tree clean, branch in sync with origin, PR viewable and ready for review.

    Summary

    Implemented per-step token usage emission in the AG-UI headless stream (issue #1253). RenderAGUI now publishes a CUSTOM event named token_usage after every LLM step by reusing sessionResult(model, repo) - the same builder that feeds the terminal RUN_FINISHED result - so mid-run and terminal values can never drift. Verified via code trace that the agent records usage (AddTokenUsage) and assistant tool calls in the conversation repo before the completion event publishes, so each snapshot is current when tools start running. Emission is suppressed for zero-request runs. Desktop side stays inert until this ships, per desktop#306's prepared parser.

    • PR: feat(render): stream per-step token usage in ag-ui headless output #1254 (ready for review)
    • Changes: emitTokenUsage in agui.go (mirrors the agent_status/background_tasks/queued_message extension points), wiring + docs comments in render.go, TestRenderAGUI_TokenUsageStreamsPerStep render test (one event per step, all seven value fields including contextWindow, none for zero-request runs), event documented in docs/ag-ui-output.md
    • RenderAGUI crossed the cyclop cap with the new branch; nolint-ed per repo convention for cohesive event switches
    • Checks: task precommit:run and full task test green; commit pushed to fix/issue-1253
    • Board: issue moved to In progress, then QA; docs follow-up filed as [DOCS] ag-ui headless stream gains per-step token_usage custom event docs#700

    skipped: nothing - value builder reused verbatim from RUN_FINISHED; add a per-turn delta event only if the desktop asks for incremental (not cumulative) values.

    Model: ollama_cloud/glm-5.3-flash · Exit Code: 0 · Duration: 10m 10s

    Tokens: 3,481,142 in · 40,813 out · 3,521,955 total (43 requests)

    Tool calls: 64 total · 100% success rate

    Traces
    Session: 1789901800-53d9f3a4
    
    session (headless, success)                                                                        10m2s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.6s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.6s [error: *errors.errorString]
    ├── execute_tool Read call_tqv83bem                                                                248µs
    ├── execute_tool Read call_bliyn5v6                                                                185µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.8s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_ej7kksfs                                                            70µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.4s [error: *errors.errorString]
    ├── execute_tool Bash call_okaldgqh                                                                341ms
    ├── execute_tool Bash call_lbulehvb                                                                  9ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.5s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.5s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.5s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s [error: *errors.errorString]
    ├── execute_tool Grep call_097pzzvv                                                                  3ms
    ├── execute_tool Bash call_lsoe9tjc                                                                968ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.6s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.6s [error: *errors.errorString]
    ├── execute_tool Read call_g3syvedo                                                                278µs
    ├── execute_tool Bash call_fvidze10                                                                446ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                16.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      16.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    16.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            16.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                16.8s [error: *errors.errorString]
    ├── execute_tool Grep call_54sznyqk                                                                223ms
    ├── execute_tool Grep call_b50dw6g9                                                                 16ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.9s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.9s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.9s [error: *errors.errorString]
    ├── execute_tool Grep call_spndrfzo                                                                  4ms
    ├── execute_tool Read call_r2m27cg6                                                                241µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                15.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      15.2s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    15.2s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            15.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                15.2s [error: *errors.errorString]
    ├── execute_tool Grep call_jrwdjpac                                                                 40ms
    ├── execute_tool Grep call_ue7fannd                                                                306µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.4s [error: *errors.errorString]
    ├── execute_tool Read call_s5g5eqsi                                                                204µs
    ├── execute_tool Read call_kd8fu86k                                                                263µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                17.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      17.1s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    17.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            17.1s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                17.1s [error: *errors.errorString]
    ├── execute_tool Read call_39h3qmm2                                                                182µs
    ├── execute_tool Read call_i3jgrhyy                                                                240µs
    ├── execute_tool Read call_eq07jvtv                                                                244µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                19.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      19.2s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    19.2s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            19.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                19.2s [error: *errors.errorString]
    ├── execute_tool Grep call_wner19qb                                                                768µs
    ├── execute_tool Read call_0yvhb1ol                                                                180µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                25.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      25.5s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    25.5s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            25.5s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                25.5s [error: *errors.errorString]
    ├── execute_tool Grep call_kxrr03ps                                                                 32ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 9.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       9.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     9.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             9.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 9.4s [error: *errors.errorString]
    ├── execute_tool Grep call_6ev2egov                                                                520µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                30.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      30.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    30.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            30.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                30.8s [error: *errors.errorString]
    ├── execute_tool MultiEdit call_rcf28ioh                                                           296µs [error: tool_error]
    ├── chat ollama_cloud/glm-5.3-flash                                                                24.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      24.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    24.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            24.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                24.4s [error: *errors.errorString]
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.1s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.1s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.1s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.1s [error: *errors.errorString]
    ├── execute_tool MultiEdit call_aektwts2                                                           346µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                15.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      15.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    15.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            15.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                15.4s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_d2vx151j                                                            67µs
    ├── execute_tool Edit call_y0xqtmk8                                                                293µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                16.0s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      16.0s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    16.0s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            16.0s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                16.0s [error: *errors.errorString]
    ├── execute_tool Bash call_qvl5v262                                                                  3ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                28.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      28.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    28.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            28.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                28.4s [error: *errors.errorString]
    ├── execute_tool MultiEdit call_f7lh4alw                                                           341µs
    ├── execute_tool Edit call_hn9uj9qk                                                                372µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.8s [error: *errors.errorString]
    ├── execute_tool Bash call_h1wjc15p                                                                15.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.8s [error: *errors.errorString]
    ├── execute_tool Bash call_0ivyokaw                                                                1m22s [error: tool_error]
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.1s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.1s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.1s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.1s [error: *errors.errorString]
    ├── execute_tool Grep call_rbd8s49s                                                                 58ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.9s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.9s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.9s [error: *errors.errorString]
    ├── execute_tool Edit call_p5qz9a3x                                                                371µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.0s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.0s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.0s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.0s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.0s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_zw8pmcss                                                            64µs
    ├── execute_tool Bash call_udx7z20g                                                                12.0s [error: tool_error]
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.7s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.7s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.7s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.7s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.7s [error: *errors.errorString]
    ├── execute_tool Edit call_kwshtua3                                                                320µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.5s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.5s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.5s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s [error: *errors.errorString]
    ├── execute_tool Bash call_ffnodg0r                                                                 5.5s [error: tool_error]
    ├── chat ollama_cloud/glm-5.3-flash                                                                 6.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.5s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.5s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             6.5s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.5s [error: *errors.errorString]
    ├── execute_tool Read call_m06ux2r0                                                                127µs
    ├── execute_tool Bash call_tv9wz2nf                                                                  5ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                13.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      13.2s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    13.2s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            13.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                13.2s [error: *errors.errorString]
    ├── execute_tool Edit call_5xq4hy5i                                                                259µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.8s [error: *errors.errorString]
    ├── execute_tool Memory call_8jh8g8k1                                                               1.3s
    ├── execute_tool Bash call_y0dula29                                                                 3.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.4s [error: *errors.errorString]
    ├── execute_tool Bash call_9k0vavsh                                                                1m20s
    ├── execute_tool Bash call_7x1cfy6r                                                                  7ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                14.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      14.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    14.6s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            14.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                14.6s [error: *errors.errorString]
    ├── execute_tool Bash call_3cjldf5x                                                                  7ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.4s [error: *errors.errorString]
    ├── execute_tool Bash call_s2hd1x6k                                                                 3.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                12.0s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      12.0s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    12.0s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            12.0s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                12.0s [error: *errors.errorString]
    ├── execute_tool Write call_l1ptp006                                                               921µs
    ├── execute_tool Bash call_1qldep9l                                                                 1.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.7s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.7s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.7s [error: *errors.errorString]
    ├── execute_tool Write call_h9p6fctv                                                               696µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                11.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      11.9s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    11.9s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            11.9s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                11.9s [error: *errors.errorString]
    ├── execute_tool Bash call_kytzhg6q                                                                 1.8s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 5.1s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.1s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             5.1s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.1s [error: *errors.errorString]
    ├── execute_tool WebFetch call_decxjg0t                                                            154ms
    ├── execute_tool Bash call_060voddi                                                                505ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 7.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.6s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             7.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.6s [error: *errors.errorString]
    ├── execute_tool Write call_wedgv4po                                                               661µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.8s [error: *errors.errorString]
    ├── execute_tool Bash call_t8esn5mw                                                                959ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 5.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.6s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             5.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.6s [error: *errors.errorString]
    ├── execute_tool Write call_q0gze77g                                                               874µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.8s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.8s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.8s [error: *errors.errorString]
    ├── execute_tool Bash call_inl1beb8                                                                 1.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 6.1s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.1s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             6.1s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.1s [error: *errors.errorString]
    ├── execute_tool Bash call_apsyaaef                                                                  7ms
    ├── execute_tool Bash call_dlc8cxz4                                                                 1.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.3s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.3s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.3s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.3s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.3s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_oik1otkk                                                            53µs
    ├── execute_tool Bash call_euq4b10c                                                                298ms
    ╰── chat ollama_cloud/glm-5.3-flash                                                                 6.5s
        ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.5s
            ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.5s [error: *errors.errorString]
                ╰── POST /proxy/:provider/*path [inference-gateway, server]                             6.5s
                    ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.5s [error: *errors.errorString]
    
    Stats
    Tool Calls
    
    ╭───────────┬───────┬───────┬────────╮
    │ Tool      │ Calls │ Fail% │ Avg    │
    ├───────────┼───────┼───────┼────────┤
    │ Bash      │ 23    │ 13%   │ 9150ms │
    │ Read      │ 11    │ 0%    │ 0ms    │
    │ Grep      │ 10    │ 0%    │ 38ms   │
    │ Edit      │ 5     │ 0%    │ 0ms    │
    │ TodoWrite │ 4     │ 0%    │ 0ms    │
    │ Write     │ 4     │ 0%    │ 0ms    │
    │ MultiEdit │ 3     │ 33%   │ 0ms    │
    │ Memory    │ 1     │ 0%    │ 1299ms │
    │ WebFetch  │ 1     │ 0%    │ 154ms  │
    ╰───────────┴───────┴───────┴────────╯
    
    Token Usage
    
    ╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
    │ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
    ├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
    │ ollama_cloud/glm-5.3-flash │ 3481142 │ 2876160 │ 40813      │ 3521955 │ -    │
    ╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯
    
    Sessions
    
    ╭───────────┬──────────┬──────────╮
    │ Execution │ Mode     │ Sessions │
    ├───────────┼──────────┼──────────┤
    │ headless  │ headless │ 1        │
    ╰───────────┴──────────┴──────────╯
    

    Triggered by edenreich · Infer Action · OSS

  7. moved this from Todo to In progress in 2026on Sep 20, 2026
  8. moved this from In progress to QA in 2026on Sep 20, 2026
  9. inference-gateway-releaser commented on Sep 20, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.205.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  10. moved this from QA to Done in 2026on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions