Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1
github.com/a2aproject/a2a-go/v2 v2.5.0
github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260312103001-8e7ab1df34c8
github.com/anthropics/anthropic-sdk-go v1.73.0
github.com/anthropics/anthropic-sdk-go v1.74.0
github.com/github/copilot-sdk/go v1.0.14
github.com/gofrs/flock v0.13.1
github.com/google/jsonschema-go v0.4.3
github.com/google/uuid v1.6.0
github.com/modelcontextprotocol/go-sdk v1.8.0
github.com/openai/openai-go/v3 v3.61.0
github.com/openai/openai-go/v3 v3.63.1
go.opentelemetry.io/otel v1.46.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0
go.opentelemetry.io/otel/metric v1.46.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ github.com/a2aproject/a2a-go/v2 v2.5.0 h1:ZdcFoxv+nZTUV0i2ue5hES76YCANFPG9vjqd7v
github.com/a2aproject/a2a-go/v2 v2.5.0/go.mod h1:NcRp/ZHxgMzDj12/BteIC2gOjljuEBKaGRfEdJ2lNSI=
github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260312103001-8e7ab1df34c8 h1:gcgM2iVSJ+5v1Li2O2xBm8jdY9bIo0coZdOlXOd0uLU=
github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260312103001-8e7ab1df34c8/go.mod h1:ERAMOexUee4AIuoxksuuGoEcHl3aqLwaazjGwlR9ZCI=
github.com/anthropics/anthropic-sdk-go v1.73.0 h1:brLt0oVV6LH0YcG6O6G3pBnIVDJQ/QPoXul+OJHXEFc=
github.com/anthropics/anthropic-sdk-go v1.73.0/go.mod h1:x+lPk/cCl48uRegeP0hlYYBN1b7bEBTveInIMgLicnY=
github.com/anthropics/anthropic-sdk-go v1.74.0 h1:u6pcrBJHLJZb1Q6uziqQ5VLvAjh82sJrreWmABdOOas=
github.com/anthropics/anthropic-sdk-go v1.74.0/go.mod h1:x+lPk/cCl48uRegeP0hlYYBN1b7bEBTveInIMgLicnY=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk=
Expand Down Expand Up @@ -73,8 +73,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/modelcontextprotocol/go-sdk v1.8.0 h1:KIvahhYqwtbeniWVPs3TcXEA7b8jEtwfBpOTAI+Urx4=
github.com/modelcontextprotocol/go-sdk v1.8.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts=
github.com/openai/openai-go/v3 v3.61.0 h1:nMLuGFdKBF0sB3qFVNwE8kpBpenVN1ucYRoKcx7E1u0=
github.com/openai/openai-go/v3 v3.61.0/go.mod h1:ufI1+K+t0ijRB3gk8eztiw1crcDpsBuxRQL4sbLIrts=
github.com/openai/openai-go/v3 v3.63.1 h1:/OiQNzBQAdbu7foAnYcS9iBauG4n53nyiVDHt5CU3KQ=
github.com/openai/openai-go/v3 v3.63.1/go.mod h1:dE39tezpSvL+SHpkZQm7XhSc8BOLDzu8CEh1mHc9MzU=
github.com/pb33f/ordered-map/v2 v2.3.1 h1:5319HDO0aw4DA4gzi+zv4FXU9UlSs3xGZ40wcP1nBjY=
github.com/pb33f/ordered-map/v2 v2.3.1/go.mod h1:qxFQgd0PkVUtOMCkTapqotNgzRhMPL7VvaHKbd1HnmQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
Expand Down
11 changes: 2 additions & 9 deletions provider/openaiprovider/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,10 @@ func responsesBuildCompletionParams(config AgentConfig, messages []*message.Mess
case *hostedtool.MCPServer:
var variant responses.ToolMcpParam
variant.ServerLabel = tl.ServerName
// The Responses API accepts either a server_url (a full HTTP(S)
// endpoint) or a connector_id (a bare service-connector identifier
// such as "connector_googledrive"); the two are mutually exclusive.
// url.Parse only errors on control-char/malformed input, so it
// cannot distinguish the two. Discriminate on an actual URL scheme
// instead, routing scheme-bearing addresses to server_url and bare
// connector IDs to connector_id.
// url.Parse only errors on control-char/malformed input, so only
// treat scheme-bearing HTTP(S) addresses as server_url values.
if u, err := url.Parse(tl.ServerAddress); err == nil && (u.Scheme == "http" || u.Scheme == "https") {
variant.ServerURL = openai.String(tl.ServerAddress)
} else {
variant.ConnectorID = tl.ServerAddress
}
if tl.ServerDescription != "" {
variant.ServerDescription = openai.String(tl.ServerDescription)
Expand Down
4 changes: 2 additions & 2 deletions provider/openaiprovider/responses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3382,9 +3382,9 @@ func TestResponsesMCPServerToolAddressRouting(t *testing.T) {
wantTool string
}{
{
name: "bare connector id routes to connector_id",
name: "bare connector id is not serialized",
serverAddress: "connector_googledrive",
wantTool: `{"type":"mcp","server_label":"drive","connector_id":"connector_googledrive"}`,
wantTool: `{"type":"mcp","server_label":"drive"}`,
},
{
name: "https url routes to server_url",
Expand Down
Loading