Skip to content

docs: session create examples use parameter names that don't exist in any SDK #79

Description

@nibzard

Summary

An external evaluation of agent traces flagged friction around session creation. Validating it against the OpenAPI spec (steel-main/apps/api/openapi/openapi.json) and all four SDK repos (steel-node, steel-python, steel-go, steel-rust) confirmed one large docs bug and a few smaller ones: 18 spots across 16 pages document a sessionTimeout / session_timeout parameter that exists in no SDK and not in the REST API.

The verified truth:

Surface Session timeout param Custom ID param
REST API / OpenAPI timeout (default 300000 ms), inactivityTimeout sessionId
steel-node timeout sessionId
steel-python api_timeout (wire-aliased to timeout; timeout is reserved for the HTTP request timeout) session_id
steel-go Timeout SessionID
steel-rust timeout session_id

Impact: the Python spelling raises TypeError: unexpected keyword argument; the TS spelling is a compile error under strict excess-property checks, or silently ignored in JS, so users get the 5-minute default and sessions die mid-run.

P0: replace the invented timeout parameter (18 spots)

Sync warning: scripts/sync-cookbook.ts regenerates content/docs/cookbook/ pages from the steel-cookbook recipe READMEs, and several of the bullets below mirror that upstream text. The steel-cookbook READMEs must be fixed first (or together with this), otherwise the next sync reintroduces the bug.

sessionTimeouttimeout (TypeScript context):

  • content/docs/cookbook/trigger-dev-browser-job.mdx:26 (inside a code fence, the only executable occurrence)
  • content/docs/cookbook/google-adk.mdx:107
  • content/docs/cookbook/vercel-ai-sdk-nextjs.mdx:83
  • content/docs/cookbook/mastra.mdx:102
  • content/docs/cookbook/magnitude.mdx:114
  • content/docs/cookbook/openai-agents.mdx:89
  • content/docs/cookbook/playwright.mdx:73
  • content/docs/cookbook/puppeteer.mdx:69
  • content/docs/cookbook/vercel-ai-sdk.mdx:77
  • content/docs/cookbook/credentials.mdx:86

session_timeoutapi_timeout (Python context):

  • content/docs/cookbook/selenium.mdx:91
  • content/docs/cookbook/playwright.mdx:147
  • content/docs/cookbook/stagehand.mdx:240
  • content/docs/cookbook/notte.mdx:75
  • content/docs/cookbook/agno.mdx:70
  • content/docs/cookbook/credentials.mdx:169
  • content/docs/cookbook/browser-use.mdx:66
  • content/docs/cookbook/browser-use-captcha-auto.mdx:91

All 18 are prose bullets except trigger-dev-browser-job, which has it in real code.

P1: wrong-language and wrong-case snippets

  • content/docs/changelog/changelog-015.mdx:20 and :52: fences labeled TypeScript contain Python bodies; the second snippet (StealthConfig={humanize_interactions=True}) is invalid syntax in both languages
  • content/docs/changelog/changelog-018.mdx:25: TypeScript-labeled fence with a Python body (upload_from_store(url=...), extension_ids=[...])
  • content/docs/changelog/changelog-019.mdx:26: Python-style # comment inside a TypeScript fence
  • content/docs/overview/captchas-api/overview.mdx:65: Python example passes stealth_config={"autoCaptchaSolving": False}; the Python SDK TypedDict key is auto_captcha_solving
  • content/docs/overview/stealth/captcha-solving.mdx:123: same autoCaptchaSolving casing bug in a Python fence

P2: document that session IDs are one-shot

  • Add one sentence to the "Reserving a Session ID" section in content/docs/overview/sessions-api/session-lifecycle.mdx: recreating a session with a released session's ID returns a 409 Conflict ("Session with this sessionId already exists"), so generate a fresh UUID per session. The API already links to this page in that error, so the answer should be here when users land on it.

Acceptance criteria

  • No occurrence of sessionTimeout or session_timeout remains in content/docs/
  • Every session-create example compiles/runs against steel-node and steel-python current releases
  • Changelog fences match their labeled language
  • Lifecycle page states the ID-reuse constraint

Related findings, out of scope for this repo

  • steel-cookbook: fix the session_timeout prose bullets in the recipe READMEs that sync-cookbook.ts pulls from (blocking for the P0 checklist above)
  • steel-node: the published npm README references api.md twice but the file is not shipped in the package (Stainless config)

The evaluation report's product asks (lifecycle-aware errors, server-side trace visibility, steel init) are intentionally excluded; those belong in the API/platform tracker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions