Skip to content

fix(code-interpreter/python): apply endpoint headers in sync adapter#504

Open
Gujiassh wants to merge 1 commit intoalibaba:mainfrom
Gujiassh:fix/python-code-interpreter-endpoint-headers
Open

fix(code-interpreter/python): apply endpoint headers in sync adapter#504
Gujiassh wants to merge 1 commit intoalibaba:mainfrom
Gujiassh:fix/python-code-interpreter-endpoint-headers

Conversation

@Gujiassh
Copy link
Contributor

Summary

  • merge SandboxEndpoint.headers into the Python sync code-interpreter adapter so sync execd calls receive endpoint-specific headers just like the async flow
  • let endpoint headers override connection-level headers on key collisions to match the higher-priority endpoint contract
  • add focused sync adapter regressions for both header propagation and override behavior

Validation

  • cd sdks/code-interpreter/python && uv run pytest tests/test_code_service_adapter_sync_headers.py -q
  • cd sdks/code-interpreter/python && uv run pytest tests/test_code_interpreter_create_and_delegation.py tests/test_code_service_adapter_streaming.py tests/test_code_service_adapter_sync_headers.py -q
  • cd sdks/code-interpreter/python && uv run ruff check src/code_interpreter/sync/adapters/code_adapter.py tests/test_code_service_adapter_sync_headers.py

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working sdk/python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants