Skip to content

Fix reserved image_gen.imagegen tool-schema 400 #255

Description

@andrei-hasna

Problem

Codewith 0.1.67 can submit image_gen.imagegen as a custom function and receive HTTP 400:

Invalid Value: 'tools'. Function 'image_gen.imagegen' is reserved for use by this model and must match the configured schema.

The planner can choose native hosted image_generation or the standalone namespaced extension depending on provider, model, Responses Lite, namespace support, and ImageGenExt.

Expected

Emit only the provider-supported representation: native hosted image_generation, or the exact canonical reserved namespace schema. Never send a mismatched custom function under a reserved name.

Acceptance

  • Reproduce the request shape without credentials.
  • Add pre-send reserved-name/schema validation.
  • Test ChatGPT and API auth modes, Responses Lite, ImageGenExt on/off, namespace support, and extension present/absent.
  • Fail closed or hide the extension when the canonical schema is unavailable.
  • Preserve a documented fallback path.
  • Add regression coverage at the serialized request boundary.

Todo: OPE2-00086

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