Skip to content

[bug] OCI OpenAI models reject top-level ListProperty structured outputs #208

Open

Description

@alorenc00

Description

In the current Wayflow version, a PromptExecutionStep cannot use a single ListProperty as its outermost output_descriptors entry when the model is an OpenAI model served through OCI's native chat API.

Wayflow sends a root JSON array schema for that output. OCI rejects the request with HTTP 400 for openai.gpt-5.4. An object schema containing the same list is accepted, so callers currently have to add an outer ObjectProperty to get the request through.

Reproduction

Configure an OCIGenAIModel with model_id="openai.gpt-5.4" and OCI's native API. Use it with a PromptExecutionStep configured for structured generation and one list output:

output_descriptors=[
    ListProperty(name="results", item_type=StringProperty())
]

Run the step. OCI rejects the root array schema with HTTP 400. Wrap the list in an ObjectProperty and the request succeeds.

Expected behavior

A caller should be able to declare a top-level ListProperty and receive a list without adding an outer object solely to satisfy OCI. This should work for both regular and streaming generation.

The workaround should apply to OpenAI models on OCI's native chat API without changing the schemas sent for other OCI model providers or for object outputs.

Environment

  • Wayflow: current main before the proposed fix
  • Model: openai.gpt-5.4
  • API: OCI native chat API

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions