← Back to Pull requests

Build OpenAI-compatible models with the Responses API #2116

Closed
unknown closed this pull request without merging on Oct 21, 2026 15:16 UTC
View on GitHub
unknown unknown commented on Oct 05, 2026 16:40 UTC
Author

🤖

Goal

Closes embabel/embabel-agent#2120.

Provide an explicit OpenAI-compatible factory path for models served through the Responses API, including GPT-6 Luna workflows that need reasoning and tools.

What changed

  • Move the existing Responses adapter into the OpenAI module and expose it through OpenAiCompatibleModelFactory.openAiResponsesLlm.

  • Reuse the merged embabel/embabel-agent#1874 adapter work.

  • This complements embabel/embabel-agent#2100 (catalogue routing) and embabel/embabel-agent#1941 (continuation); it does not implement either selection policy or continuation.
  • Result

    Applications can explicitly create Responses-backed models with a custom-compatible endpoint and credentials, and with reasoning options for any provider name. Native structured output is used when the caller passes the shipped catalogue's nativeSupportDefaults. The factory keeps no copy of those settings, and the #2027 schema compatibility gate still falls back to prompt-based output. The customization guide documents the path.

    Boundaries

    This does not add streaming, media support, reasoning-item/assistant-phase replay, or automatic continuation. It does not guarantee Responses API support on arbitrary custom endpoints or guarantee no provider-side storage. Existing callers choose the Responses factory explicitly; no default transport is switched.

    Verification

    All on head f3ddcd8b8, Java 21, system mvn, -Dmaven.gitcommitid.skip=true -Dkotlin.compiler.daemon=false.

  • Focused: mvn -o -q -pl embabel-agent-openai,embabel-agent-autoconfigure/models/embabel-agent-openai-autoconfigure -am test -Dtest='OpenAiCompatibleModelFactoryResponsesTest,OpenAiResponsesCatalogStructuredOutputTest' -Dsurefire.failIfNoSpecifiedTests=false. BUILD SUCCESS: 6 + 3 tests, 0 failures.

  • Affected modules: mvn -o -pl embabel-agent-api,embabel-agent-openai,embabel-agent-autoconfigure/models/embabel-agent-openai-autoconfigure -am test. BUILD SUCCESS: 5,099 tests, 0 failures, 0 errors, 24 skipped. The skipped tests are disabled tests; no live integration tests run. This includes the binary-compatibility test the published constructors still link.

  • Fixes from review: each new test failed before its fix and passes now.

  • - a function call the output limit cut short is not dispatched: a function_call marked incomplete is no longer returned as a tool call.
    - schema names are cut to the length the api accepts: the schema name stays within OpenAI's 64 characters.
    - the chat observation reports the configured provider: the observation reported OpenAI for a service built as Acme Gateway; it now reports Acme Gateway.
    - the published constructors still link: the adapter's published four-argument constructor and Kotlin's default-argument constructor exist and construct. Before the fix, the four-argument one threw NoSuchMethodException.
    - an explicit reasoning effort is preserved for an endpoint with its own provider name: before the fix, the request built as Acme Gateway had no reasoning; it now carries reasoning.effort = low.
    - without native support structured output is left to the prompt: the factory used to send a text.format from its own copy of the catalogue settings; with no nativeSupport it now sends none.
  • Schema gate on the factory path: in OpenAiResponsesCatalogStructuredOutputTest, a model built by the factory with the catalogue's nativeSupportDefaults sends a compatible schema as text.format json_schema. A schema with an open Map falls back to prompt-based output.
  • Diff: 482 lines (+361 / -121) across 6 files Reviewer: arnabnandy7 Review duration: 22955m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 482 lines diff across 6 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.370
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #2116"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52.3% (MEDIUM) · Higher = larger blast radius
    52.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.6% · Safe to merge
    20.6%