embabel-agent icon indicating copy to clipboard operation
embabel-agent copied to clipboard

OpenAI `*-pro` models are unusable: they require the Responses API, but embabel only calls Chat Completion

Open azanux opened this issue 5 months ago • 1 comments

Summary

The *-pro models declared in openai-models.yml (gpt-5-pro, gpt-5.2-pro, gpt-5.4-pro) cannot be used. OpenAI serves them only via /v1/responses, but embabel's OpenAiCompatibleModelFactory.chatModelOf(...) always builds a Spring AI OpenAiChatModel, which targets /v1/chat/completions.

Every real call to a pro model fails with: HTTP 400 - "This model is only supported in v1/responses and not in v1/chat/completions." (param: model)

Evidence

An integration test surveying all 17 declared OpenAI LLMs against the real API (current factory path):

Result Models
✅ pass gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, ggpt-5.3-chat-latest, gpt-5.2, gpt-5.1, gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, gpt-4o-mini
❌ fail gpt-5.4-pro, gpt-5.2-pro, gpt-5-pro

Root cause

  • Build resolves Spring AI 1.1.7 (spring-ai-openai:1.1.7), which has no Responses API client, only OpenAiChatModel (Chat Completions).
  • No config workaround: repointing OPENAI_COMPLETIONS_PATH to /v1/responses doesn't work, since the wire format differs (messages/choices vs input/output).
  • No other endpoint (image / embeddings / audio / moderation) can reach these text models.

Scope

  • Catalog: OpenAiModelDefinition / SpecialHandlingConfiguration have no API-type field.
  • Factory: OpenAiCompatibleModelFactory.chatModelOf(...) is the single, hardcoded Chat Completions path.

azanux avatar Jul 04 '26 15:07 azanux

The spring-ai-openai:1.1.7 dependency does not include a dedicated Responses API or Assistants client. It is strictly designed around the Chat Completions API abstraction via the OpenAiChatModel and the fluent ChatClient API.

There is no Direct Assistant/Response API Support.

Suggesting considering moving to the Spring AI 2.0.0 GA release line. @jasperblues @alexheifetz - please advise - should we have a workaround (facade), or implement Response API as part of the Spring AI 2.x migration?

igordayen avatar Jul 07 '26 02:07 igordayen