Skip to content

[codex] fix gateway request cleanup and model listing#3

Merged
WindoC merged 1 commit into
masterfrom
fix/issue-2-memory-leak
Jul 6, 2026
Merged

[codex] fix gateway request cleanup and model listing#3
WindoC merged 1 commit into
masterfrom
fix/issue-2-memory-leak

Conversation

@WindoC

@WindoC WindoC commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fix gateway request lifecycle handling and Docker packaging issues found while verifying issue #2.

Changes include:

  • Bound /v1/models SDK discovery with CODEBUDDY_GATEWAY_MODELS_TIMEOUT, falling back to the gateway model list when discovery hangs.
  • Add request body size enforcement and cleanup of request abort/close listeners.
  • Guard response writes after client disconnects.
  • Normalize CRLF shell scripts during Docker build so Linux shebangs work from Windows checkouts.
  • Update tests and docs for the new behavior and verification flow.

Validation

  • npm test from gateway/: passed, 10/10
  • node --check gateway/server.mjs: passed
  • Local API verification passed for /health, /v1/models, non-streaming chat, custom tool calls, tool-result continuation, and streaming SSE
  • Docker build passed for codebuddy-gateway:custom-tool-supported
  • Container API verification passed for /health, /v1/models, non-streaming chat, custom tool calls, tool-result continuation, and streaming SSE

Closes #2

@WindoC WindoC marked this pull request as ready for review July 6, 2026 07:37
@WindoC WindoC merged commit 91e7e22 into master Jul 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory leak

1 participant