Skip to content

Cannot progress past first chat: Missing required parameter: 'input[2].id' #3451

Closed

Description

@abazabaaa

What version of Codex is running?

codex-cli 0.34.0

Which model were you using?

gpt-5

What platform is your computer?

Linux 4.18.0-553.el8_10.x86_64 x86_64 x86_64

What steps can reproduce the bug?

>_ You are using OpenAI Codex in /ap/bin

 To get started, describe a task or try one of these commands:

 /init - create an AGENTS.md file with instructions for Codex
 /status - show current session configuration and token usage
 /approvals - choose what Codex can do without approval
 /model - choose what model and reasoning effort to use

▌hi

> Hey! How can I help today?

▌hi

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Missing required parameter: 'input[2].id'.",
    "type": "invalid_request_error",
    "param": "input[2].id",
    "code": "missing_required_parameter"
  }
}; retrying 1/5 in 200ms…

⚠️ stream error: unexpected status 400 Bad Request: {
  "error": {
    "message": "Missing required parameter: 'input[2].id'.",
    "type": "invalid_request_error",
    "param": "input[2].id",
    "code": "missing_required_parameter"
  }
}; retrying 2/5 in 431ms…

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

codex-cli 0.31.0 Works without this issue.

model_provider = "azure"
model = "gpt-5"
sandbox_mode = "danger-full-access"
preferred_auth_method = "apikey"

[model_providers.azure]
name = "Azure"
base_url = "https://xxxxxx.azure-api.net/xxxxx/openai"
query_params = { api-version = "2025-04-01-preview" }
wire_api = "responses"
env_http_headers = { api-key = "OPENAI_API_KEY" }

[profiles.gpt-5]
model = "gpt-5"
model_provider = "azure"
model_reasoning_effort = "high"
model_reasoning_summary = "detailed"

Activity

  1. added
    bug
    on Sep 11, 2025
  2. Chetansuri7 commented on Sep 11, 2025

    @Chetansuri7

    facing same issue. had to downgrade to npm install -g @openai/[email protected] to make it work.

  3. daklik commented on Sep 11, 2025

    @daklik

    Same issue here - had to revert also to 0.31.0.
    Azure OpenAI, GPT-5-mini, api version 2025-04-01-preview, sandbox danger-full-access.

  4. doggy8088 commented on Sep 11, 2025

    @doggy8088

    Same issue here. I tried 0.32.0, 0.33.0, 0.34.0 which are all failed. Only 0.31.0 works. Please fix it.

    Image
  5. self-assigned this
    on Sep 11, 2025
  6. added
    azure
    on Sep 11, 2025
  7. bro4all commented on Sep 11, 2025

    @bro4all

    funny that on .31 I have this error:

    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "Item with id 'rs_68c2f345755c819697feb282e2fedf9509f1adb864821dc1' not found. Items are not persisted when `store` is
    set to false. Try again with `store` set to true, or remove this item from your input.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    

    which I know that @pakrym-oai patched in the later versions but I can't use anything further than .29 with my setup.

    Azure api integration really need to be documented and tested every release

  8. rxreyn3 commented on Sep 11, 2025

    @rxreyn3

    This guy appears to be the cause. #3390

  9. john-lu-ptc commented on Sep 11, 2025

    @john-lu-ptc

    Same issue!

  10. intherejeet commented on Sep 11, 2025

    @intherejeet

    same issue

  11. Einorde commented on Sep 12, 2025

    @Einorde

    same issue, and can't downgrade with homebrew using brew install [email protected]

  12. DevOps-zhuang commented on Sep 12, 2025

    @DevOps-zhuang

    It still doesn't work even downgrade to 0.31 :-(

    my setting is like:
    env_key = "AZURE_OPENAI_API_KEY"
    query_params = { api-version = "2025-04-01-preview" }

    and the result is:
    unexpected status 400 Bad Request: {"error":
    {"code":"BadRequest","message":"API version not supported"}}

  13. rxreyn3 commented on Sep 12, 2025

    @rxreyn3

    It still doesn't work even downgrade to 0.31 :-(

    my setting is like:
    env_key = "AZURE_OPENAI_API_KEY"
    query_params = { api-version = "2025-04-01-preview" }

    and the result is:
    unexpected status 400 Bad Request: {"error":
    {"code":"BadRequest","message":"API version not supported"}}

    That's a different error than what we're chatting about. You might want to search for another related issue or at least post all the important bits from config.

  14. supernitin commented on Sep 12, 2025

    @supernitin

    Azure is the red headed step child around here :(

  15. lperezeverfield commented on Sep 12, 2025

    @lperezeverfield

    same issue

  16. 5 remaining items

  17. CezaryKlus commented on Sep 15, 2025

    @CezaryKlus

    @pakrym-oai same error

    \"Missing required parameter: 'input[2].id'.\"

  18. pakrym-oai commented on Sep 15, 2025

    @pakrym-oai
    Contributor

    We had to apply some workaround for Azure API issues. We detect azure by looking at the host name ("openai.azure.",
    "cognitiveservices.azure.","aoai.azure.","azure-api.", "azurefd.") or the config name (looking for model provider named azure).

    Does this match your config?

  19. rxreyn3 commented on Sep 15, 2025

    @rxreyn3

    @pakrym-oai I reverted #3390 and build locally to get around this myself.

  20. ksquarekumar commented on Sep 15, 2025

    @ksquarekumar

    Can confirm 0.36.0 also has this issue

    model = "<YOUR-DEPLOYMENT-NAME>"
    model_provider = "<YOUR-PROVIDER-NAME>"
    profile = "<YOUR-PROFILE-NAME>"
    
    [model_providers."<YOUR-PROVIDER-NAME>"]
    name = "Azure"
    base_url = "https://<YOUR-RESOURCE-NAME>.openai.azure.com/openai/v1/"
    env_key = "AZURE_OPENAI_API_KEY"
    wire_api = "responses" # Changed from "chat", works as of v1 api GA, recommended by openAI ?
    request_max_retries = 4
    stream_max_retries = 10
    stream_idle_timeout_ms = 300000
    
    [profiles."<YOUR-PROFILE-NAME>"]
    model = "<YOUR-DEPLOYMENT-NAME>"
    model_provider = "<YOUR-PROVIDER-NAME>"
    

    While this works for me, and resolves the need to specify API Versions, it started breaking again with

    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "Missing required parameter: 'input[3].id'.",
        "type": "invalid_request_error",
        "param": "input[3].id",
        "code": "missing_required_parameter"
      }
    }; retrying 2/10 in 418ms…
    

    don't pick from /models though else it gives ⚠️ stream error: unexpected status 404 Not Found: {"error":{"code":"DeploymentNotFound"...}} errors. [This is it's own set of unresolved errors and config jank]

    Azure support is really chaotic.

  21. Jer-y commented on Sep 15, 2025

    @Jer-y

    Can you try the latest version please? Are you still getting the same error?

    0.36.0 works for me. Below are my toml

    [model_providers.azure]
    name = "Azure"
    base_url = "https://<AOAI>.openai.azure.com/openai/"
    env_key = "AZURE_OPENAI_API_KEY"  # Or "OPENAI_API_KEY", whichever you use.
    query_params = { api-version = "2025-04-01-preview" }
    wire_api = "responses"
    
  22. lordmauve commented on Sep 16, 2025

    @lordmauve

    We had to apply some workaround for Azure API issues. We detect azure by looking at the host name ("openai.azure.",
    "cognitiveservices.azure.","aoai.azure.","azure-api.", "azurefd.") or the config name (looking for model provider named azure).

    @pakrym-oai My firm proxies Azure for various reasons so a domain approach cannot work.

    The name approach works but is very peculiar because name doesn't look like a functional field, it looks like it's offered to help maintain your config file.

    Because it's an exact match I can't even set the name to "Azure via internal proxy" or something.

    Isn't the best way to handle this to create a wire_api for Azure?

    wire_api = "azure-responses"
  23. pakrym-oai commented on Sep 16, 2025

    @pakrym-oai
    Contributor

    Isn't the best way to handle this to create a wire_api for Azure?

    It is an option but we are trying to avoid proliferating wire formats especially for something that is a bug in Azure API implementation and has to be fixed soon.

  24. doggy8088 commented on Sep 16, 2025

    @doggy8088

    I believe 0.36.0 fixed the issue. Just run the following command to install latest version of Codex CLI:

    npm i -g @openai/codex
  25. pakrym-oai commented on Sep 16, 2025

    @pakrym-oai
    Contributor

    I'm going to close the issue. Please install Codex CLI 0.36 and use the exact definition from https://github.com/openai/openai/pull/474542 (we're matching azure provider by name and on Azure host names to apply a workaround for a bug in Azure implementation of Responses API).

  26. tkellogg commented on Sep 16, 2025

    @tkellogg

    I believe 0.36.0 fixed the issue. Just run the following command to install latest version of Codex CLI:

    npm i -g @openai/codex

    This works for me. Thanks!

  27. emerzon commented on Sep 17, 2025

    @emerzon

    This workaround does not solve cases where the connection to Azure is routed via a Proxy (Ie. LiteLLM).
    @pakrym-oai , please reopen the issue
    As suggested above, having something like wire_api = "azure-responses" would be a more robust workaround

  28. rxreyn3 commented on Sep 17, 2025

    @rxreyn3

    Is anyone else seeing this on .36 only when resuming sessions? I'm wondering if I should create another issue.

  29. understood-the-assignment commented on Sep 19, 2025

    @understood-the-assignment

    Please install Codex CLI 0.36 and use the exact definition from https://github.com/openai/openai/pull/474542

    @pakrym-oai That link is broken, I am guessing that you mean #3542.

    This workaround does not solve cases where the connection to Azure is routed via a Proxy (Ie. LiteLLM).

    Here is the code:

    pub(crate) fn is_azure_responses_endpoint(&self) -> bool {
    if self.wire_api != WireApi::Responses {
    return false;
    }
    if self.name.eq_ignore_ascii_case("azure") {
    return true;
    }
    self.base_url
    .as_ref()
    .map(|base| matches_azure_responses_base_url(base))
    .unwrap_or(false)
    }

    @emerzon I think it should be possible to get it working in your situation. The code checks if name is azure OR if the URL contains some substrings, which looks flexible enough (i.e. just add your LiteLLM configuration under a [model_providers.azure] section in config.toml).

  30. paulopacitti commented on Oct 15, 2025

    @paulopacitti

    This indeed is an issue that extends to litellm. I'm working on a suggestion of a config option to force this behaviour of sending reasoning ids aka store: true. I'll link to this issue soon. Thanks for the discussion on this issue, even that's closed status, it helped a lot to troubleshoot this.

    cc: @FelipeRodriguesGare

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

Metadata

Metadata

Assignees

Labels

azurebug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions