Skip to content

SDK V2 release #142

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

Merged
merged 9 commits into from
Aug 22, 2025
Merged

SDK V2 release #142

merged 9 commits into from
Aug 22, 2025

Conversation

jakubno
Copy link
Member

@jakubno jakubno commented Aug 21, 2025

No description provided.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Missing Headers in Execution Request

In the post_execute handler, the request parameter is an ExecutionRequest Pydantic model (the JSON body). The code tries to access request.headers to get an access token. Since ExecutionRequest has no headers attribute, this raises an AttributeError, breaking every /execute call and preventing code execution.

template/server/main.py#L99-L115

if context_id:
ws = websockets.get(context_id, None)
else:
ws = websockets["default"]
if not ws:
return PlainTextResponse(
f"Context {request.context_id} not found",
status_code=404,
)
# set global env vars if not set on first execution
if not ws.global_env_vars:
access_token = request.headers.get("X-Access-Token")
ws.global_env_vars = await get_envs(access_token)
await ws.set_env_vars(ws.global_env_vars)

Fix in Cursor Fix in Web


Comment @cursor review or bugbot run to trigger another review on this PR

@mlejva mlejva merged commit aa45123 into main Aug 22, 2025
6 checks passed
@mlejva mlejva deleted the v2-prerelease branch August 22, 2025 10:01
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.

2 participants