Environment
- Surface: API + SDK
- Endpoint or feature: Responses
- Model: gpt-5-nano
- SDK and version, if applicable: Python SDK 2.9.0
Bug
According to the API Reference for EasyInput, EasyInput.content can accept a list of ResponseInputText.
However, sending such input returns a 400: “Invalid value: ‘input_text’. Supported values are: ‘output_text’ and ‘refusal’.”
Reproduction
import asyncio
from openai import AsyncOpenAI
from openai.types.responses import EasyInputMessageParam, ResponseInputTextParam
async def main():
async with AsyncOpenAI() as client:
response = await client.responses.create(
model="gpt-5-nano",
input=[
EasyInputMessageParam(
role="user",
content=[
ResponseInputTextParam(
type="input_text",
text="who are you?",
)
],
),
EasyInputMessageParam(
role="assistant",
content=[
ResponseInputTextParam(
type="input_text",
text="i am a bot",
)
],
),
EasyInputMessageParam(
role="assistant",
content=[
ResponseInputTextParam(
type="input_text",
text="is there a Rust OpenAI SDK? how mature is it?",
)
],
),
],
)
print(response)
if __name__ == "__main__":
asyncio.run(main())
Note that this snippet is valid according to a type checker (pyright).
Output:
openai.BadRequestError: Error code: 400 - {'error': {'message': "Invalid value: 'input_text'. Supported values are: 'output_text' and 'refusal'.", 'type': 'invalid_request_error', 'param': 'input[1].content[0]', 'code': 'invalid_value'}}
Expected output
The call produces a valid response.