Skip to content

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

Merged
ninan-nn merged 1 commit intoalibaba:mainfrom
Gujiassh:fix/python-code-interpreter-endpoint-headers
Mar 25, 2026
Merged

fix(code-interpreter/python): apply endpoint headers in sync adapter#504
ninan-nn merged 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>
Copy link
Collaborator

@ninan-nn ninan-nn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, LGTM

Copy link
Collaborator

@ninan-nn ninan-nn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ninan-nn ninan-nn merged commit 6ccd798 into alibaba:main Mar 25, 2026
11 checks passed
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