magpieModels gave a routing group no native API, since its members may
each want another. Pi, omp and droid then asked every group on Chat
Completions, and dsh put it on its Chat route, even a group of GPT
members all served on Responses. The gateway translated each answer from
Responses to Chat, and that translation holds a tool call's arguments
until the call ends (#613), so Pi's Code Mode saw no code until the whole
call had been generated.
A group now has APIs ["responses"] when every member, nested groups'
included, is served best on Responses (allResponses over the group's
members, by Provider.Native). Any other group keeps none: one with a Chat
member, and a Messages-only group too, as the gateway knows whether a
Claude thinks adaptively by its own model id, not the group's. dsh moves
a start on such a group to its Responses route (dshStartOnItsRoute); a
dsh session resumed on it asks for the model once, as for any model that
moved routes.
The rest of the request (a protocol picked per group, conversion shown
per request) is not in this commit.
Verified:
- TestPiModelsAskedOnTheirNativeAPI: auto-gpt-5-5, a GPT group and a
group of that group get openai-responses; a group with a Chat member
and one of Messages-only members get none. Without the route.go change
it fails for the three Responses groups.
- TestOmpModelsAskedOnTheirNativeAPI: the same for omp.
- TestGroupOnResponsesRelaysArgumentDeltas (gateway): a group of two
Responses-only members asked on /v1/responses relays each
function_call_arguments.delta as the vendor sent it, on /responses.
It guards what this change relies on, and passed before it too.
- go test ./internal/agent ./internal/provider, gofmt -l, GOOS=linux and
windows go vet -tags nogui.
- Not tried with a real Pi against a real group.