Skip to content

refactor(a2a): extract A2A into its own bounded context - #1371

Merged
edenreich merged 1 commit into
mainfrom
refactor/a2a-bounded-context
Sep 28, 2026
Merged

edenreich merged 1 commit into
mainfrom
refactor/a2a-bounded-context

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

Extracts A2A out of the agent and scheduler contexts into internal/a2a, laid out like internal/mcp:

  • internal/a2a/domain: agent cards, AgentSupervisor, AgentState, TaskTracker, TaskPollingState, TaskInfo, retention and background-task contracts, and task-state normalization.
  • internal/a2a/infrastructure: the ADK client adapters (NewClient, AgentCardClient).
  • internal/a2a: the A2A_QueryAgent / A2A_QueryTask / A2A_SubmitTask tools and their manifests (internal/a2a/tools/*.yaml), the task job, tracker, retention, background task service, agent supervisor, status probe and the a2a_agents system-prompt section. The container registers a2a.NewTools(...) like the browser and computer tools.

internal/agent/application is gone, and internal/agent/tools has no A2A code.

Knots untied

  • tools.NewRegistry takes the generic scheddomain.BackgroundTaskRegistry instead of an A2A tracker, with no type assertions.
  • scheddomain no longer references A2A types. TaskRetainer becomes the generic JobFinisher hook, A2AStateProvider / A2APollingStates become Supervisor.RunningJobs(kind), and BackgroundTaskRegistry no longer embeds the A2A tracker. The tracker itself discards in-flight A2A jobs on conversation clear/switch.
  • llm_tool_service.go has no A2A_ special cases. A2A tools implement the new agentdomain.SelfGatedTool, so a2a.enabled alone still switches them on.
  • isTrustedAgentHost becomes config.IsA2AAgentHost, and extractFilenameFromURL becomes download.FilenameFromURL, shared by WebFetch and the artifact download.
  • The agent receives the a2a_agents prompt section as a func() string, like the plugin instructions.
  • Presentation uses a2adomain types. Task-state labels are shared TaskStatus* constants, and NormalizeTaskState replaces four ad-hoc string comparisons.
  • depguard: github.com/inference-gateway/adk is only imported inside internal/a2a (plus its generated fake).
  • The A2A agent manager naming is now agentSupervisor throughout.

Behavior notes

  • A disabled tool now errors tool X is not enabled, replacing "A2A tools are not enabled" / "local tools are not enabled".
  • A2A tool arguments are now validated before the call, where they used to be skipped. The messages match what the tools returned.
  • Non-canonical remote states display normalized (for example input-required shows "Input Required").
  • Markdown subagents still load after the A2A tools register, so A2A tools stay allowed in .infer/agents/*.md tool lists.
  • infer export registers the A2A tools itself so their results keep their formatting.
  • JobKindA2A stays in scheddomain next to JobKindRecording.

Test plan

  • task precommit:run (mod tidy, mocks regenerated from the new paths, fmt, lint: 0 issues)
  • go test ./..., including the tool-definitions golden test with the golden file unchanged
  • Smoke: infer tools execute A2A_QueryAgent runs with a2a.enabled, rejects missing args, and reports not enabled when A2A is off

Closes #1368. Refs #1366.

Move the A2A tools, the agent supervisor, the status probe, task tracking,
retention and the background task service out of the agent and scheduler
contexts into internal/a2a, laid out like internal/mcp: a pure domain/,
infrastructure/ for the ADK client adapters, and a root package the
container registers through a2a.NewTools.

- tools.NewRegistry takes the generic job registry instead of an A2A tracker
- scheddomain contracts no longer reference A2A types: retention runs through
  the generic JobFinisher hook and live A2A rows through RunningJobs
- llm_tool_service drops its A2A_ special cases for the SelfGatedTool contract
- task states normalize to adk.TaskState constants in one place
- depguard confines github.com/inference-gateway/adk to internal/a2a

Closes #1368
@edenreich
edenreich requested a review from a team as a code owner September 28, 2026 00:18
@edenreich

Copy link
Copy Markdown
Contributor Author

@infer Can you review this PR? is it ready for merge? use /ponytail:ponytail-review /go /go-concurrency /domain-driven-design /clean-code /clean-architecture

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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

Todos

  • Read PR diff and commit history
  • Review internal/a2a new bounded context (domain, infrastructure, tools)
  • Review scheduler/agent decoupling changes
  • Review container wiring and presentation changes
  • Check dependency-rule violations and concurrency correctness
  • Write final review with inline findings JSON

Pull Request

#1371

✅ Infer Result: Success

All review reads are complete. Let me finalize the todo list and deliver the review.

Review complete. Here is my full assessment of PR #1371, read against all six invoked lenses.

Verdict

This is a well-executed bounded-context extraction. The architecture work is genuinely good and none of my findings are merge blockers - but there is one latent data race, one WaitGroup hazard, and roughly 180 lines of dead flexibility the move carried along, so I would land it after a small cleanup pass. Verdict: comment, not approve-yet.

What is good (clean-architecture / DDD)

The Dependency Rule holds. Diagnostic-wise this scores about 7/10 on the DDD quick check and 6/7 on the clean-architecture one:

  • The ADK is confined to internal/a2a and the confinement is enforced by a new depguard rule, not convention. infrastructure/ is a real anti-corruption layer over the ADK (NewClient, AgentCardClient).
  • scheddomain is A2A-free: TaskRetainer became the generic JobFinisher, A2APollingStates became RunningJobs(kind), and BackgroundTaskRegistry no longer embeds the A2A tracker. The scheduler now speaks only its own language.
  • Presentation consumes a2adomain types only, and a2a imports point inward (agent/domain shared kernel, scheddomain, platform). The one cross-context import - A2A tools using agent/infrastructure.CustomFormatter - matches how browser and computer tools consume the same formatter, so it is consistent repo convention rather than a leak.
  • Container wiring is correct: ensureBackgroundTaskRegistry (which creates the job supervisor) runs before initializeA2A, and LoadMarkdownAgents is called after A2A tools register, keeping the subagent tool-list behavior intact.
  • Behavior changes (unified tool X is not enabled error, A2A argument validation now actually running) are acknowledged in the PR body and are improvements.

Findings - over-engineering (ponytail-review format)

  • internal/a2a/submit_task.go:L383-397 + L527-541: shrink - handleQueryError and applyExponentialBackoff are byte-identical bodies, each carrying 4 dead params. One backoffInterval(strategy, currentInterval, ticker) helper, called from both sites.
  • internal/a2a/submit_task.go:L356: shrink - initializePollingStrategy ignores both agentURL and taskID. Two-line function, drop the params.
  • internal/a2a/submit_task.go:L301, L325-326, L336: delete - pollingDetails accumulates "Poll #N" lines and handleTaskState discards it as _. Nothing replaces it.
  • internal/a2a/submit_task.go:L399-402: shrink - extractTextFromParts is a one-line alias for textFromParts. Call it directly at the 4 call sites.
  • internal/a2a/submit_task.go:L424: shrink - handleTaskState carries dead taskID, pollAttempt, pollingDetails params.
  • internal/a2a/tracker.go:L89-417: yagni - nine exported methods only tests call (GetContextsForAgent, GetAgentForContext, RemoveContext, GetTasksForContext, GetContextForTask, HasTask, GetAllAgents, GetAllContexts, GetPollingTasksForContext), ~110 lines plus their test cases. The a2adomain.TaskTracker interface defines what is needed; this move is the moment to drop the rest.
  • internal/a2a/domain/tasks.go:L34-38 + internal/a2a/retention.go:L56-72: delete - SetMaxRetention/GetMaxRetention have no production caller (interface + impl + generated fake all carry them).

Net: -180 production lines possible, plus their tests.

Findings - concurrency (go-concurrency)

  • internal/a2a/submit_task.go:L413: state.LastKnownState = stateStr writes the same *TaskPollingState pointer the tracker indexes, from the poll goroutine, with no lock. Today nothing reads that field (the task view reads the mutex-guarded copy from a2aJob.PollingState(), and CancelBackgroundTask only touches the pre-submit fields), so the write is both redundant and a latent data race the moment any reader appears. Delete it - a2aJob.recordState under mu is already the single source.
  • internal/a2a/supervisor.go:L177-178, L200: monitorExternalAgents runs as an untracked goroutine, sleeps 2s, then does probeWg.Add(1). If StopAgents runs inside that window, probeWg.Wait() returns before the Adds and the probes are never waited on - the WaitGroup "Add before Wait" contract is broken. Spawn the probe goroutines synchronously from StartAgents (drop the magic 2s sleep) or track the monitor goroutine itself. Pre-existing code moved verbatim, but worth fixing while it is being relocated.

Findings - clean code / Go

  • internal/a2a/tracker.go:L271 and L381: the loop variable t shadows the receiver t *TaskTracker in RemoveTask and StopPolling. Works, but reads backwards; rename to task.
  • Naming wart (ubiquitous language): a2adomain.Clearer with method ClearAllAgents() actually clears the tracker's context/task graph - the conversation layer holds it as taskTracker. A name like DiscardTasks would match what it does. Cosmetic, can ride along.
  • One load-bearing subtlety deserves its "why" in the doc comment: TaskTracker.ClearAllAgents calls DiscardKind before taking t.mu precisely because DiscardKind -> Close -> StopPolling takes that mutex. Anyone reordering those two lines deadlocks the session.

Test quality

Good coverage carried over and adapted: tracker tables, job/retention tests rewritten against JobFinisher, supervisor RunningJobs test, and the tool-definitions golden file unchanged - which is itself a nice signal that the extraction preserved the model-visible surface.

{
  "verdict": "comment",
  "findings": [
    {
      "path": "internal/a2a/submit_task.go",
      "line": 383,
      "side": "RIGHT",
      "start_line": 383,
      "body": "handleQueryError and applyExponentialBackoff (L527) have identical bodies and each carries four dead params. Keep one helper and call it from both sites.\n\n```suggestion\n// backoffInterval returns the next poll interval: scaled by the configured\n// backoff when strategy is exponential, otherwise the current interval.\nfunc (t *SubmitTaskTool) backoffInterval(strategy string, currentInterval time.Duration, ticker *time.Ticker) time.Duration {\n\tif strategy != \"exponential\" {\n\t\treturn currentInterval\n\t}\n\n\tnewInterval := time.Duration(float64(currentInterval) * t.config.A2A.Task.BackoffMultiplier)\n\tmaxInterval := time.Duration(t.config.A2A.Task.MaxPollIntervalSec) * time.Second\n\tif newInterval > maxInterval {\n\t\tnewInterval = maxInterval\n\t}\n\n\tticker.Reset(newInterval)\n\n\treturn newInterval\n}\n```\n\nThen delete applyExponentialBackoff and point both call sites at backoffInterval."
    },
    {
      "path": "internal/a2a/submit_task.go",
      "line": 356,
      "side": "RIGHT",
      "body": "initializePollingStrategy ignores agentURL and taskID - drop them and collapse the branches.\n\n```suggestion\nfunc (t *SubmitTaskTool) initializePollingStrategy(strategy string) time.Duration {\n\tif strategy == \"exponential\" {\n\t\treturn time.Duration(t.config.A2A.Task.InitialPollIntervalSec) * time.Second\n\t}\n\treturn time.Duration(t.config.A2A.Task.StatusPollSeconds) * time.Second\n}\n```"
    },
    {
      "path": "internal/a2a/submit_task.go",
      "line": 301,
      "side": "RIGHT",
      "body": "Dead accumulation: pollingDetails collects \"Poll #N\" lines (L325-326) and is passed to handleTaskState as `pollingDetails.String()` (L336), where the parameter is discarded as `_`. Delete the builder, its Fprintf, and the argument."
    },
    {
      "path": "internal/a2a/submit_task.go",
      "line": 400,
      "side": "RIGHT",
      "body": "extractTextFromParts is a one-line alias for textFromParts (failure.go). Delete the method and call textFromParts directly at its four call sites."
    },
    {
      "path": "internal/a2a/submit_task.go",
      "line": 424,
      "side": "RIGHT",
      "body": "handleTaskState carries dead params: taskID, pollAttempt and pollingDetails are all `_`. Narrow the signature to (ctx, agentURL, state, currentTask)."
    },
    {
      "path": "internal/a2a/submit_task.go",
      "line": 413,
      "side": "RIGHT",
      "body": "Unsynchronized write to the tracker-shared *TaskPollingState from the poll goroutine. No reader consumes this field today (the task view reads the mutex-guarded copy from a2aJob.PollingState, and CancelBackgroundTask only reads pre-submit fields), so the write is redundant - and a latent data race for any future reader. Delete it: a2aJob.recordState already stores the state under mu."
    },
    {
      "path": "internal/a2a/tracker.go",
      "line": 89,
      "side": "RIGHT",
      "start_line": 89,
      "body": "yagni: nine exported query/mutation methods only tests call, carried over from the old scheduler tracker (~110 lines plus their test cases): GetContextsForAgent, GetAgentForContext, RemoveContext, GetTasksForContext, GetContextForTask, HasTask, GetAllAgents, GetAllContexts, GetPollingTasksForContext. The a2adomain.TaskTracker interface is the contract; delete the rest and their tests. This move is the cheapest moment to drop them."
    },
    {
      "path": "internal/a2a/domain/tasks.go",
      "line": 35,
      "side": "RIGHT",
      "start_line": 34,
      "body": "SetMaxRetention/GetMaxRetention have no production caller - interface, impl (retention.go L56-72) and the generated fake all carry unused flexibility. Drop both from the contract and the service; maxRetention stays a constructor value."
    },
    {
      "path": "internal/a2a/tracker.go",
      "line": 271,
      "side": "RIGHT",
      "start_line": 271,
      "body": "Loop variable t shadows the receiver t *TaskTracker in RemoveTask (and again in StopPolling, L381). Rename it so the method reads correctly.\n\n```suggestion\n\t\t\tfor i, task := range ctx.Tasks {\n\t\t\t\tif task.TaskID == taskID {\n\t\t\t\t\tctx.Tasks = append(ctx.Tasks[:i], ctx.Tasks[i+1:]...)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n```"
    },
    {
      "path": "internal/a2a/supervisor.go",
      "line": 178,
      "side": "RIGHT",
      "start_line": 177,
      "body": "WaitGroup hazard: monitorExternalAgents runs untracked, sleeps 2s, then calls probeWg.Add(1) (L200). If StopAgents runs inside that window, probeWg.Wait() returns before the Adds and the probe goroutines are never waited on. Also the 2s sleep is a magic delay. Spawn the probe goroutines synchronously from StartAgents (or track the monitor goroutine itself) so the Add-before-Wait contract holds. Pre-existing behavior moved verbatim - good moment to fix it."
    }
  ]
}

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

Tokens: 1,767,684 in · 20,234 out · 1,787,918 total (18 requests)

Tool calls: 37 total · 100% success rate

Traces
Session: 1790555025-e92e161a

session (headless, success)                                                                        2m45s
├── chat ollama_cloud/glm-5.3-flash                                                                 7.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.2s
├── execute_tool Read call_7pns46ye                                                                144µs
├── execute_tool Read call_vlj88vqb                                                                156µs
├── execute_tool Read call_xbnv3ts1                                                                144µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.1s
├── execute_tool Read call_bmwwttuu                                                                135µs
├── execute_tool Read call_ebr14k06                                                                144µs
├── execute_tool Read call_47bj0hda                                                                144µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.5s
├── execute_tool TodoWrite call_52mrzl0w                                                            68µs
├── execute_tool Bash call_38rm5tb2                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.2s
├── execute_tool Bash call_q1giicia                                                                 15ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.2s
├── execute_tool Read call_tb16zjmx                                                                155µs
├── execute_tool Read call_wmv8mfik                                                                160µs
├── execute_tool Read call_gm7uoq38                                                                161µs
├── execute_tool Read call_wmhcoatk                                                                155µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.6s
│   ╰── 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
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s
├── execute_tool Read call_yxh56uq3                                                                156µs
├── execute_tool Read call_3wh2hmbg                                                                199µs
├── execute_tool Read call_n6fwvdou                                                                155µs
├── execute_tool Read call_6itky9kc                                                                137µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.1s
├── execute_tool TodoWrite call_etyoid25                                                            60µs
├── execute_tool Read call_7kw1ttqe                                                                255µs
├── chat ollama_cloud/glm-5.3-flash                                                                 8.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       8.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     8.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             8.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 8.1s
├── execute_tool Read call_b7ldo7v6                                                                205µs
├── execute_tool Read call_svhrb2qc                                                                260µs
├── execute_tool Read call_9g9dbtjd                                                                257µs
├── execute_tool Read call_wz3vwe5k                                                                187µs
├── chat ollama_cloud/glm-5.3-flash                                                                 5.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             5.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.5s
├── execute_tool Read call_rezcdclc                                                                263µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.3s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.3s
├── execute_tool Read call_i7lghe7o                                                                150µs
├── execute_tool Read call_3rbnrpw7                                                                151µs
├── execute_tool Read call_xosfgi4b                                                                 72µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.7s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.7s
├── execute_tool Bash call_wbnotes5                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 7.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             7.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.2s
├── execute_tool Bash call_ksi76xaw                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.2s
│   ╰── 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
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.1s
├── execute_tool Grep call_661qqg5d                                                                436ms
├── execute_tool Read call_kjbmu0l7                                                                162µs
├── chat ollama_cloud/glm-5.3-flash                                                                16.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      15.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    15.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            15.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                15.9s
├── execute_tool Grep call_ug65rgyr                                                                 80ms
├── execute_tool Bash call_1vmxp1zm                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 9.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       9.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     9.7s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             9.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 9.7s
├── execute_tool Bash call_o4lrol9z                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                17.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      17.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    17.6s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            17.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                17.6s
├── execute_tool Grep call_oqxpd3ka                                                                  1ms
├── execute_tool Grep call_fcn4ogta                                                                 79ms
├── chat ollama_cloud/glm-5.3-flash                                                                33.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      33.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    33.3s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            33.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                33.3s
├── execute_tool TodoWrite call_dij5jx65                                                            51µs
╰── chat ollama_cloud/glm-5.3-flash                                                                24.4s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                      24.3s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    24.3s
            ╰── POST /proxy/:provider/*path [inference-gateway, server]                            24.3s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                24.3s
Stats
Tool Calls

╭───────────┬───────┬───────┬───────╮
│ Tool      │ Calls │ Fail% │ Avg   │
├───────────┼───────┼───────┼───────┤
│ Read      │ 24    │ 0%    │ 165µs │
│ Bash      │ 6     │ 0%    │ 7ms   │
│ Grep      │ 4     │ 0%    │ 150ms │
│ TodoWrite │ 3     │ 0%    │ 53µs  │
╰───────────┴───────┴───────┴───────╯

Token Usage

╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 1767684 │ 1384320 │ 20234      │ 1787918 │ -    │
╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

@edenreich
edenreich merged commit ac7dfc3 into main Sep 28, 2026
1 check passed
@edenreich
edenreich deleted the refactor/a2a-bounded-context branch September 28, 2026 00:33
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.216.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Refactor extract A2A into its own bounded context

1 participant