Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions py/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ def test_agno(session, version):
_install_test_deps(session)
_install_matrix_dep(session, "agno", version)
_install_group_locked(session, "test-agno")
_run_tests(session, f"{INTEGRATION_DIR}/agno/test_agno.py", version=version)
_run_tests(session, f"{INTEGRATION_DIR}/agno/test_workflow.py", version=version)
_run_tests(session, f"{INTEGRATION_DIR}/agno", version=version)


LIVEKIT_AGENTS_VERSIONS = _get_matrix_versions("livekit-agents")
Expand Down
21 changes: 21 additions & 0 deletions py/src/braintrust/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,23 @@ def skip_vcr_tests_in_wheel_mode(request):
pytest.skip("VCR tests skipped in wheel mode (pre-release sanity check only)")


_SENSITIVE_RESPONSE_HEADERS = {
"openai-organization",
"openai-project",
"set-cookie",
}


def _scrub_sensitive_response_headers(response):
"""Remove sensitive provider headers before writing a cassette."""
response["headers"] = {
name: value
for name, value in response.get("headers", {}).items()
if name.lower() not in _SENSITIVE_RESPONSE_HEADERS
}
return response


def get_vcr_config():
"""
Get VCR configuration for recording/playing back HTTP interactions.
Expand All @@ -247,6 +264,9 @@ def get_vcr_config():
"authorization",
"Authorization",
"openai-organization",
"openai-project",
"cookie",
"Cookie",
"x-api-key",
"api-key",
"openai-api-key",
Expand All @@ -259,6 +279,7 @@ def get_vcr_config():
"amz-sdk-request",
"x-amzn-bedrock-api-key",
],
"before_record_response": _scrub_sensitive_response_headers,
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
interactions:
- request:
body: '{"messages":[{"role":"developer","content":"<instructions>\nDescribe the
image in one word.\n</instructions>"},{"role":"user","content":[{"type":"text","text":"What''s
in this image?"},{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=="}}]}],"model":"gpt-4o-mini"}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '371'
content-type:
- application/json
host:
- api.openai.com
user-agent:
- OpenAI/Python 2.31.0
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 2.31.0
x-stainless-read-timeout:
- '600'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.14.6
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
body:
string: "{\n \"id\": \"chatcmpl-E2MZDFm1JBErEB3lbW8PJBHrj49Ve\",\n \"object\":
\"chat.completion\",\n \"created\": 1784232111,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"Red.\",\n \"refusal\": null,\n
\ \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\":
\"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 8529,\n \"completion_tokens\":
2,\n \"total_tokens\": 8531,\n \"prompt_tokens_details\": {\n \"cached_tokens\":
0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
{\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\":
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\":
\"default\",\n \"system_fingerprint\": \"fp_844ddd95ff\"\n}\n"
headers:
access-control-expose-headers:
- X-Request-ID
- CF-Ray
- CF-Ray
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
cf-ray:
- a1c399e609df4fcb-YYZ
connection:
- keep-alive
content-length:
- '814'
content-type:
- application/json
date:
- Thu, 16 Jul 2026 20:01:51 GMT
openai-processing-ms:
- '556'
openai-version:
- '2020-10-01'
server:
- cloudflare
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
transfer-encoding:
- chunked
x-content-type-options:
- nosniff
x-openai-proxy-wasm:
- v0.1
x-ratelimit-limit-input-images:
- '50000'
x-ratelimit-limit-requests:
- '30000'
x-ratelimit-limit-tokens:
- '150000000'
x-ratelimit-remaining-input-images:
- '49999'
x-ratelimit-remaining-requests:
- '29999'
x-ratelimit-remaining-tokens:
- '149999210'
x-ratelimit-reset-input-images:
- 1ms
x-ratelimit-reset-requests:
- 2ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_5d175e2325594ca8bb63ef1d92003b07
status:
code: 200
message: OK
- request:
body: '{"session_id":"5b14603b-835b-4837-9b92-3006800a5515","run_id":"5ddac676-8ef5-48a5-a25a-ed78dda4ce84","data":{"agent_id":"vision-agent","db_type":null,"model_provider":"OpenAI","model_name":"OpenAIChat","model_id":"gpt-4o-mini","parser_model":null,"output_model":null,"has_tools":true,"has_memory":false,"has_reasoning":false,"has_knowledge":false,"has_input_schema":false,"has_output_schema":false,"has_team":false},"sdk_version":"2.1.0","type":"agent"}'
headers:
accept:
- '*/*'
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '453'
content-type:
- application/json
host:
- os-api.agno.com
user-agent:
- agno/2.1.0
method: POST
uri: https://os-api.agno.com/telemetry/runs
response:
body:
string: '{"message":"Run creation acknowledged: 5ddac676-8ef5-48a5-a25a-ed78dda4ce84","status":"success"}'
headers:
connection:
- keep-alive
content-length:
- '96'
content-type:
- application/json
cross-origin-opener-policy:
- same-origin
cross-origin-resource-policy:
- same-origin
date:
- Thu, 16 Jul 2026 20:01:51 GMT
permissions-policy:
- camera=(), microphone=(), geolocation=()
referrer-policy:
- strict-origin-when-cross-origin
server:
- uvicorn
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-frame-options:
- DENY
status:
code: 201
message: Created
version: 1
Loading