Skip to content

Commit fedb4ac

Browse files
authored
Merge branch 'main' into openai/strict_json_option
2 parents 634c383 + ce8dc4a commit fedb4ac

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ opentelemetry = [
2626
]
2727
pydantic = ["pydantic>=2.0.0,<3"]
2828
openai-agents = [
29-
"openai-agents>=0.2.11,<0.3",
29+
"openai-agents>=0.3,<0.4",
3030
"eval-type-backport>=0.2.2; python_version < '3.10'"
3131
]
3232

@@ -57,7 +57,7 @@ dev = [
5757
"pytest-cov>=6.1.1",
5858
"httpx>=0.28.1",
5959
"pytest-pretty>=1.3.0",
60-
"openai-agents[litellm]>=0.2.11,<0.3"
60+
"openai-agents[litellm]>=0.3,<0.4"
6161
]
6262

6363
[tool.poe.tasks]

temporalio/contrib/openai_agents/_invoke_model_activity.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,6 @@ async def empty_on_invoke_handoff(
173173
) -> Any:
174174
return None
175175

176-
# workaround for https://github.com/pydantic/pydantic/issues/9541
177-
# ValidatorIterator returned
178-
input_json = to_json(input["input"])
179-
input_input = json.loads(input_json)
180-
181176
def make_tool(tool: ToolInput) -> Tool:
182177
if isinstance(
183178
tool,
@@ -220,7 +215,7 @@ def make_tool(tool: ToolInput) -> Tool:
220215
try:
221216
return await model.get_response(
222217
system_instructions=input.get("system_instructions"),
223-
input=input_input,
218+
input=input["input"],
224219
model_settings=input["model_settings"],
225220
tools=tools,
226221
output_schema=input.get("output_schema"),

temporalio/contrib/openai_agents/_openai_runner.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ async def run(
6363
"Temporal OpenAI agent does not support on demand MCP servers."
6464
)
6565

66-
# workaround for https://github.com/pydantic/pydantic/issues/9541
67-
# ValidatorIterator returned
68-
input_json = to_json(input)
69-
input = json.loads(input_json)
70-
7166
context = kwargs.get("context")
7267
max_turns = kwargs.get("max_turns", DEFAULT_MAX_TURNS)
7368
hooks = kwargs.get("hooks")

uv.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)