-
Notifications
You must be signed in to change notification settings - Fork 322
feat: Expose MCP gateway keepalive-interval in workflow config schema #24220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -495,6 +495,27 @@ func (c *Compiler) extractMCPGatewayConfig(mcpVal any) *MCPGatewayRuntimeConfig | |
| } | ||
| } | ||
|
|
||
| // Extract keepaliveInterval / keepalive-interval (keepalive ping interval in seconds for HTTP MCP backends) | ||
| // 0 = unset (gateway default: 1500s), -1 = disable keepalive, >0 = custom interval in seconds | ||
| for _, key := range []string{"keepaliveInterval", "keepalive-interval"} { | ||
| if keepaliveVal, hasKeepalive := mcpObj[key]; hasKeepalive { | ||
| switch v := keepaliveVal.(type) { | ||
| case int: | ||
| mcpConfig.KeepaliveInterval = v | ||
| case int64: | ||
| mcpConfig.KeepaliveInterval = int(v) | ||
| case uint: | ||
| mcpConfig.KeepaliveInterval = int(v) | ||
| case uint64: | ||
| mcpConfig.KeepaliveInterval = int(v) | ||
| case float64: | ||
| mcpConfig.KeepaliveInterval = int(v) | ||
| } | ||
| // Break when the key exists (even if value is 0, to avoid picking up a second key variant) | ||
| break | ||
| } | ||
|
Comment on lines
+500
to
+516
|
||
| } | ||
|
|
||
| return mcpConfig | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler explicitly accepts both
keepaliveInterval(camelCase) andkeepalive-interval(kebab-case) in frontmatter, but this schema only allowskeepalive-interval(andadditionalProperties: falsewill reject the camelCase variant). Either addkeepaliveIntervalto the schema as an allowed alias (optionally marked deprecated) or drop camelCase support in extraction to keep validation/intellisense aligned with actual accepted inputs.