Skip to content

feat: stamp gateway attribution metadata#4

Merged
haasonsaas merged 1 commit intomainfrom
harden/shim-attribution-20260503
May 3, 2026
Merged

feat: stamp gateway attribution metadata#4
haasonsaas merged 1 commit intomainfrom
harden/shim-attribution-20260503

Conversation

@haasonsaas
Copy link
Copy Markdown
Contributor

Summary

  • add team, workload, session, and evidence attribution headers to the Anthropic shim
  • pass the new attribution options through sync and async Python clients and the TypeScript client
  • keep org/principal/trace behavior backward compatible

Tests

  • npm test
  • npm run typecheck
  • .venv/bin/python -m pytest tests

@cursor
Copy link
Copy Markdown

cursor Bot commented May 3, 2026

PR Summary

Low Risk
Low risk: additive, optional request headers and constructor options with updated tests; no changes to auth flow or core request logic beyond extra metadata.

Overview
Adds support for stamping additional EvalOps attribution headers—X-EvalOps-Team-ID, X-EvalOps-Workload, X-EvalOps-Session-ID, and X-EvalOps-Evidence-ID—sourced from new constructor/options fields or the corresponding EVALOPS_* env vars.

Threads these new options through the Python Anthropic/AsyncAnthropic clients and the TypeScript EvalOpsAnthropic client via build_evalops_headers/buildEvalOpsHeaders, and updates unit tests to assert the new headers are present while keeping existing org/principal/trace behavior intact.

Reviewed by Cursor Bugbot for commit 66e90e0. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit f17caa3 into main May 3, 2026
5 checks passed
@haasonsaas haasonsaas deleted the harden/shim-attribution-20260503 branch May 3, 2026 05:15
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