Skip to content

fix(examples): use exported InputMessageItem type in call-model example - #668

Open
CryptAm wants to merge 1 commit into
OpenRouterTeam:mainfrom
CryptAm:patch-2
Open

fix(examples): use exported InputMessageItem type in call-model example#668
CryptAm wants to merge 1 commit into
OpenRouterTeam:mainfrom
CryptAm:patch-2

Conversation

@CryptAm

@CryptAm CryptAm commented Jul 23, 2026

Copy link
Copy Markdown

Changes

  • Replaced the non-existent OpenResponsesEasyInputMessage type with the exported InputMessageItem type in examples/call-model.example.ts.

Why

OpenResponsesEasyInputMessage is not exported from src/models/index.ts, so importing it causes a TypeScript compilation error.

The callModel() example accepts a CallModelInput, which is based on ResponsesRequest. The input field in ResponsesRequest uses InputsUnion, and InputsUnion includes InputMessageItem as a supported input type.

Using InputMessageItem matches the structure already used in the example and aligns it with the SDK's exported types.

## Changes

- Replaced the non-existent `OpenResponsesEasyInputMessage` type with the exported `InputMessageItem` type in `examples/call-model.example.ts`.

## Why

`OpenResponsesEasyInputMessage` is not exported from `src/models/index.ts`, so importing it causes a TypeScript compilation error.

The `callModel()` example accepts a `CallModelInput`, which is based on `ResponsesRequest`. The `input` field in `ResponsesRequest` uses `InputsUnion`, and `InputsUnion` includes `InputMessageItem` as a supported input type.

Using `InputMessageItem` matches the structure already used in the example and aligns it with the SDK's exported types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant