Skip to content
Merged
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
15 changes: 15 additions & 0 deletions internal/config/config_stdin.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func assignLegacyIntAlias(rawFields map[string]json.RawMessage, alias string, ta
if err := json.Unmarshal(raw, &value); err != nil {
return fmt.Errorf("invalid %s value: %w", alias, err)
}
logStdin.Printf("Applying legacy alias %q: value=%d (prefer camelCase equivalent)", alias, value)
*target = &value
return nil
}
Expand Down Expand Up @@ -304,7 +305,9 @@ func stripExtensionFieldsForValidation(data []byte) ([]byte, error) {
delete(config, "guards")

// Strip per-server "guard" and "auth" extension fields
serverCount := 0
if servers, ok := config["mcpServers"].(map[string]interface{}); ok {
serverCount = len(servers)
for _, server := range servers {
if serverMap, ok := server.(map[string]interface{}); ok {
delete(serverMap, "guard")
Expand All @@ -314,6 +317,7 @@ func stripExtensionFieldsForValidation(data []byte) ([]byte, error) {
}
}

logStdin.Printf("Stripped gateway extension fields for schema validation: %d servers processed", serverCount)
return json.Marshal(config)
}

Expand Down Expand Up @@ -516,6 +520,17 @@ func convertStdinServerConfig(name string, server *StdinServerConfig, customSche
if server.ToolTimeout != nil {
serverCfg.ToolTimeout = *server.ToolTimeout
}
if server.ConnectTimeout != nil || server.ToolTimeout != nil {
var connectTimeout any
if server.ConnectTimeout != nil {
connectTimeout = *server.ConnectTimeout
}
var toolTimeout any
if server.ToolTimeout != nil {
toolTimeout = *server.ToolTimeout
}
logStdin.Printf("HTTP server %q: custom timeouts configured: connectTimeout=%v, toolTimeout=%v", name, connectTimeout, toolTimeout)
}
Comment thread
Copilot marked this conversation as resolved.
if server.Auth != nil {
serverCfg.Auth = &AuthConfig{
Type: server.Auth.Type,
Expand Down
Loading