-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(weave): OpenAI Agents SDK integration #3882
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
718066c
test
andrewtruong 50e7b9b
test
andrewtruong b188b06
test
andrewtruong 20097fb
test
andrewtruong 0fee87a
test
andrewtruong c3834ed
test
andrewtruong e67c287
test
andrewtruong afda46f
test
andrewtruong 6bae11b
test
andrewtruong 4f83679
test
andrewtruong 8264eff
test
andrewtruong 05dfde8
test
andrewtruong 7ae6629
test
andrewtruong 4b1c850
test
andrewtruong 8c9289a
test
andrewtruong be56dbe
Merge branch 'master' into andrew/oai3
andrewtruong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Empty file.
94 changes: 94 additions & 0 deletions
94
...ntegrations/openai_agents/cassettes/openai_agents_test/test_openai_agents_quickstart.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
interactions: | ||
- request: | ||
body: '{"input":[{"content":"Write a haiku about recursion in programming.","role":"user"}],"model":"gpt-4o","include":[],"instructions":"You | ||
are a helpful assistant","stream":false,"tools":[]}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate, zstd | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '186' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.openai.com | ||
user-agent: | ||
- Agents/Python 0.0.0 | ||
x-stainless-arch: | ||
- arm64 | ||
x-stainless-async: | ||
- async:asyncio | ||
x-stainless-lang: | ||
- python | ||
x-stainless-os: | ||
- MacOS | ||
x-stainless-package-version: | ||
- 1.66.3 | ||
x-stainless-read-timeout: | ||
- '600' | ||
x-stainless-retry-count: | ||
- '0' | ||
x-stainless-runtime: | ||
- CPython | ||
x-stainless-runtime-version: | ||
- 3.12.9 | ||
method: POST | ||
uri: https://api.openai.com/v1/responses | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA3RUwW7bMAy95ysInZvCdhzbyXWn3XYdusJgbDpVJ4uGRA0tivz7YNlx4q29BBGf | ||
3iP5KPpjA6B0q46gHPmhLsq2orZLduk+r9JDVp3yKj/sT1le7rNsVyZlUuT7MjkUHVGbkXoYBfj0 | ||
So1cRdj6Od44QqG2xhFLyzzLisNhV0TMC0rwI6fhfjAk1E4kco6dOoINxsSAttcbdUuC2vg16sWF | ||
RjTbqPaTA6AjQHghM3TBAHqvvaCVSb/Ht5qDDEFq4d9kV2o9t2RGmfMg25y3WZLl26TaJsXcaSSq | ||
IzxtAAA+4i+AkveBRlpP3uN5aj8Ck7e9Py/W4h6r0dpTmaRpkVHRpdV+t6NPrY0aX1kVQccmZl53 | ||
GaGGrZC9VXtf8arqqx30dmNPF8bIEdQ3bgkaNMaDMGjxZLoHgF/2u+201UJgmAcP2oLXhmxDEf2B | ||
IuSsB+rJnQkaQ+ge1ynQWha8ju/pecEu878pMp6e4wgGdGgMmVqYTR2LUkcQF2iCHf3RHHx9fYp1 | ||
HMEyYUfo2Wp7VsfZDEVdx07uLgGoM1lyKFT70Pfo3md0A3CZny87us8r1A8jI8Rw+pjM0WjgnKhj | ||
1+PtfDeBeG9pdEox9ffCupkGHITVAkxmzcehHu5zumCb6OhIa7XHk7kuV4ivcylI29Ua5LuH/+N3 | ||
S7eU3WDzQu2NmEylz+x/tystPwM+012G85W0sKC5gUWyuBU8rb4aPQm2KDjKXzaXvwAAAP//AwBA | ||
W3tF6QQAAA== | ||
headers: | ||
CF-RAY: | ||
- 9221c6bccef336b3-YYZ | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 18 Mar 2025 03:52:16 GMT | ||
Server: | ||
- cloudflare | ||
Set-Cookie: | ||
- __cf_bm=Tqnkbc7A4PgF5SM.gzWaijlDAAnDOk9Zieo6zRFmpd4-1742269936-1.0.1.1-9U42TycTKwZ6d4ISt9Qix_e2j6Latc3s8rPzobIIvSxaXqbrj.2XcpXF2GDI88LQyM0sRkP63Fw5_2JqEPAcJqt3OQPH5IESe3_.Iu0IofY; | ||
path=/; expires=Tue, 18-Mar-25 04:22:16 GMT; domain=.api.openai.com; HttpOnly; | ||
Secure; SameSite=None | ||
- _cfuvid=KqFFy64fH2k1v0MoM0hYELHA_M66ltXaaJFWGlP2Kng-1742269936949-0.0.1.1-604800000; | ||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None | ||
Transfer-Encoding: | ||
- chunked | ||
X-Content-Type-Options: | ||
- nosniff | ||
alt-svc: | ||
- h3=":443"; ma=86400 | ||
cf-cache-status: | ||
- DYNAMIC | ||
openai-organization: | ||
- wandb | ||
openai-processing-ms: | ||
- '728' | ||
openai-version: | ||
- '2020-10-01' | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains; preload | ||
x-request-id: | ||
- req_f9ec95d382e76a8e0ef8eb42aa207c3b | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
VCR cassette contains sensitive information about the request structure.
The YAML cassette for the
test_openai_agents_quickstart
test contains detailed information about the OpenAI API interaction. While this is necessary for testing, there are some considerations:Consider adding more header filtering in the VCR configuration to avoid leaking potentially sensitive information.
🏁 Script executed:
Length of output: 535
Sensitive API Request Information Exposed in Test Cassette
The VCR cassette for
test_openai_agents_quickstart
still contains sensitive details recorded from the actual API request. While it's expected to capture some request data for testing, the current VCR configuration only filters the"authorization"
header. This leaves other sensitive headers—such as the user-agent string, package version (lines 19 and 29), runtime version (line 37), and organization identifiers (line 82)—unfiltered and exposed in the cassette.Actionable Recommendations:
tests/integrations/openai_agents/openai_agents_test.py
) to include additional headers, such as:"user-agent"
"x-stainless-package-version"
"x-stainless-runtime"