Add session_opts for arbitrary session POST body fields#193
Open
archae0pteryx wants to merge 8 commits intomainfrom
Open
Add session_opts for arbitrary session POST body fields#193archae0pteryx wants to merge 8 commits intomainfrom
archae0pteryx wants to merge 8 commits intomainfrom
Conversation
Allows passing an untyped dict of extra fields into the compute API session creation request, for admin-only parameters that shouldn't be exposed as first-class SDK options.
- Collapse health check polling from ~3 logs/attempt to 1 (GET /health - status: N) - Consistent "METHOD /path - status: N" format across compute module - Remove logging of raw access tokens and full token responses - Remove dead code in health check (unreachable PipelineStatus branch) - Trim verbose config dump to just session UUID
- Add session_headers: extra headers merged into session POST request - Switch SDK entry points to **kwargs so session_opts and session_headers don't appear in autocomplete or public interface
Track why we need a new session (404, empty response, missing uuid, etc.) and log it once when the decision is made.
Previously the PipelineStatus check was unreachable dead code — a 200 returned immediately without parsing the body. Now on 200 we parse the session response and check the actual pipeline state: RUNNING succeeds, terminal states (FAILED, ERROR, STOPPED) raise immediately, and pending states continue polling.
tschulz
requested changes
Apr 6, 2026
tschulz
approved these changes
Apr 6, 2026
…ne status
The /health endpoint can return {"message": "I'm fine"} on 200 without
session fields. Previous commit tried to parse all 200 responses as
ComputeApiSessionResponse, causing ValidationError → 60s timeout loop.
Covers running, pending, terminal states, simple health responses, non-200 retries, timeout, and missing access token. These tests would have caught the ValidationError regression from ce567f5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
session_opts: dict | Noneparameter toEyePopSdk.sync_worker(),async_worker(), andworkerEndpoint()POST /v1/sessionsbody, allowing admin-only fields to be passed without exposing them as typed SDK optionsComputeContextand applied infetch_new_compute_sessionTest plan
session_optsfields appear in the POST body