Skip to content

fix: send the agent key as a Bearer credential from Python AgentClient - #119

Merged
chaliy merged 1 commit into
mainfrom
claude/project-thread-vpmz60
Oct 11, 2026
Merged

chaliy merged 1 commit into
mainfrom
claude/project-thread-vpmz60

Conversation

@chaliy

@chaliy chaliy commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Before: Python AgentClient 0.3.0 sent Authorization: <key> with no scheme. Both the hosted Agent API channel and serve read only Authorization: Bearer <credential>, so every call after the public card failed: AuthenticationError: ... 'a valid bearer credential is required', 'status': 401.
  • After: Python sends Bearer <credential>, as specs/agent-client.md specifies and the TypeScript and Rust clients already do. The tests that pinned the bare header now assert the Bearer form.
  • The TypeScript SSE stream no longer prints "Connecting to SSE" and similar diagnostics to stdout unless EVERRUNS_SDK_DEBUG is set, so a CLI script's output stays clean.

Test Plan

  • uv run pytest: 203 passed. npm test: 190 passed. ruff, prettier, oxlint and just pre-push are clean.
  • End to end against a serve app with SERVE_API_KEYS on and a real model (gpt-6.1-sol): 0.3.0 Python fails with the 401 above. Patched Python prints "Order 42 shipped on October 9 via UPS and is expected to arrive October 13."

Checklist

  • Follows SDK API consistency guidelines (now matches TS and Rust)
  • Added/updated tests

Generated by Claude Code

The Agent Execution API (hosted API channels and serve apps) reads only
`Authorization: Bearer <credential>`, as specs/agent-client.md says and the
TypeScript and Rust clients already do. Python sent the bare key, so every
call past the public card failed with 401.

The TypeScript SSE stream no longer prints connection diagnostics to stdout
unless EVERRUNS_SDK_DEBUG is set.
@chaliy
chaliy merged commit 65809de into main Oct 11, 2026
13 checks passed
@chaliy
chaliy deleted the claude/project-thread-vpmz60 branch October 11, 2026 21:51
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.

1 participant