refactor(harness): move OpenAI harness into adk/_modules + facade export#432
Merged
Conversation
This was referenced Jun 23, 2026
7007832 to
d7367a9
Compare
09c107a to
0175fb6
Compare
Contributor
Author
|
@greptile review |
0175fb6 to
97a34fa
Compare
Contributor
Author
|
@greptile review |
1 similar comment
Contributor
Author
|
@greptile review |
d7367a9 to
97b0418
Compare
97a34fa to
b01cfcc
Compare
Contributor
Author
|
@greptile review |
97b0418 to
c7b151c
Compare
b01cfcc to
24d10ab
Compare
c7b151c to
176baf9
Compare
24d10ab to
c17c9b3
Compare
danielmillerp
approved these changes
Jun 23, 2026
c17c9b3 to
ee560a1
Compare
176baf9 to
1b41f4d
Compare
ee560a1 to
fdf6187
Compare
7448a38 to
b30a90b
Compare
Base automatically changed from
declan-scale/harness-pydantic-consolidation
to
next
June 23, 2026 23:33
… at facade
Promote the OpenAI Turn and sync tap to the canonical adk/_modules layout
(_openai_turn.py, _openai_sync.py), matching every other harness. Leave
back-compat shims at providers/_modules/{openai_turn,sync_provider}.py so
existing import paths keep working; the larger Temporal/MCP provider stays
under adk.providers.
Export OpenAITurn, openai_usage_to_turn_usage and convert_openai_to_agentex_events
from agentex.lib.adk so the OpenAI harness is a first-class facade citizen like
ClaudeCodeTurn / CodexTurn (fixes Greptile follow-up: templates can import from
the package facade instead of a private module path).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4ea74ac to
1efd8dc
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
Sixth slice of #425. Consolidates the OpenAI harness into the canonical
adk/_moduleslayout and makes it a first-class facade export._modules—OpenAITurn→_modules/_openai_turn.py, the sync tap (convert_openai_to_agentex_events) →_modules/_openai_sync.py, matching every other harness.providers/_modules/{openai_turn,sync_provider}.py, so existing import paths (tutorials, sync-openai-agents template, services) keep working. The larger Temporal/MCP provider stays underadk.providers.OpenAITurn,openai_usage_to_turn_usage, andconvert_openai_to_agentex_eventsare now exported fromagentex.lib.adk, parallel toClaudeCodeTurn/CodexTurn. The newdefault-openai-agentstemplate (next PR) imports from the package facade rather than a private module path.Test plan
pytest tests/lib/adk/providers/test_openai_turn.py test_openai_activities.py— 27 passedruff checkon all changed source — cleanNotes
Stacked on #431. Retarget to
nextafter the chain merges.🤖 Generated with Claude Code
Greptile Summary
This PR moves the OpenAI harness implementation (
OpenAITurn,convert_openai_to_agentex_events,openai_usage_to_turn_usage) fromproviders/_modules/into the canonicaladk/_modules/layout, matching every other harness (LangGraph, PydanticAI, ClaudeCode, Codex), and exposes the three symbols as first-class exports fromagentex.lib.adk._modules/_openai_turn.pyand_modules/_openai_sync.pyare lifted verbatim from their old locations; the old files become thin back-compat shims that re-export unchanged.providers/_modules/openai_turn.pynow re-exports bothOpenAITurnandopenai_usage_to_turn_usage(fixing the gap flagged in the previous review), whilesync_provider.pyre-exportsconvert_openai_to_agentex_eventsvia the explicit-alias pattern.Confidence Score: 5/5
Safe to merge — this is a pure structural lift with no logic changes; both back-compat shims are in place and the previous gap (missing openai_usage_to_turn_usage in the shim) is now resolved.
The implementation code is moved verbatim; the facade export and both shims have been verified to expose the full original surface. Tests continue to pass against the new canonical paths and the old shim paths remain importable.
No files require special attention. The two minor style issues in _openai_sync.py (unused counter, inline imports) are pre-existing carry-overs and do not affect correctness.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD facade["agentex.lib.adk\n(__init__.py)\nFacade export"] subgraph NEW ["New canonical locations (_modules)"] ot["_modules/_openai_turn.py\nOpenAITurn\nopenai_usage_to_turn_usage\n_aggregate_usage"] os["_modules/_openai_sync.py\nconvert_openai_to_agentex_events\n_extract_tool_call_info\n_extract_tool_response_info"] end subgraph SHIMS ["Back-compat shims (providers/_modules)"] shimT["providers/_modules/openai_turn.py\n(re-exports OpenAITurn +\nopenai_usage_to_turn_usage)"] shimS["providers/_modules/sync_provider.py\n(re-exports convert_openai_to_agentex_events)"] end svc["lib/core/services/adk/providers/openai.py\n(OpenAIService)"] tests["tests/lib/adk/providers/\ntest_openai_turn.py\ntest_openai_activities.py"] facade -->|imports from| ot facade -->|imports from| os shimT -->|re-exports from| ot shimS -->|re-exports from| os ot -->|imports from| os svc -->|uses| ot tests -->|imports directly from| ot%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD facade["agentex.lib.adk\n(__init__.py)\nFacade export"] subgraph NEW ["New canonical locations (_modules)"] ot["_modules/_openai_turn.py\nOpenAITurn\nopenai_usage_to_turn_usage\n_aggregate_usage"] os["_modules/_openai_sync.py\nconvert_openai_to_agentex_events\n_extract_tool_call_info\n_extract_tool_response_info"] end subgraph SHIMS ["Back-compat shims (providers/_modules)"] shimT["providers/_modules/openai_turn.py\n(re-exports OpenAITurn +\nopenai_usage_to_turn_usage)"] shimS["providers/_modules/sync_provider.py\n(re-exports convert_openai_to_agentex_events)"] end svc["lib/core/services/adk/providers/openai.py\n(OpenAIService)"] tests["tests/lib/adk/providers/\ntest_openai_turn.py\ntest_openai_activities.py"] facade -->|imports from| ot facade -->|imports from| os shimT -->|re-exports from| ot shimS -->|re-exports from| os ot -->|imports from| os svc -->|uses| ot tests -->|imports directly from| otReviews (12): Last reviewed commit: "fix(harness): sort OpenAI sync imports" | Re-trigger Greptile