Skip to content

Support codex model_provider #965

Closed
Closed

Description

@benjaminbauer

Currently t3code does not support model_providers for codex. When I try sending a prompt, I get

Image

These headers are sent by the codex cli.

Environment

OS: Linux (Arch)
t3code version: 0.0.10
Codex CLI version: 0.114.0

Custom provider: Portkey (model_provider = "portkey" in ~/.codex/config.toml)
Codex CLI config (working standalone)

model_provider = "portkey"

[model_providers.portkey]
base_url = "https://api.portkey.ai/v1"
env_key = "PORTKEY_API_KEY"
wire_api = "responses"

Running codex directly from the terminal works without issues.

Activity

  1. Iweisc commented on Mar 13, 2026

    @Iweisc
    Contributor

    seems to work for me.

  2. Iweisc commented on Mar 13, 2026

    @Iweisc
    Contributor

    Can you maybe help me reproduce the issue locally?

  3. benjaminbauer commented on Mar 13, 2026

    @benjaminbauer
    Author

    you mean you can use models via portkey in t3code?

  4. benjaminbauer commented on Mar 13, 2026

    @benjaminbauer
    Author

    could be, that the error I am seeing is just a weird behavior of portkey to signal missing auth. I have a suspicion, that portkey can deduce the correct parameters depending on the model configuration. When the env var is not correctly handed down, then the auth on portkey fails and it cannot fetch the config, thus falling back on requiring the headers.

    This should probably be solved first, so we are sure, that t3code handles env_var #317

    Repro would require a working portkey instance

  5. benjaminbauer commented on Mar 13, 2026

    @benjaminbauer
    Author

    update:

    I tried to hard-code my API key in ~/.codex/config.toml. I removed env_key = "PORTKEY_API_KEY" and tested both with

    experimental_bearer_token = "..."

    and

    http_headers = { "x-portkey-api-key" = "..." }

    I confirmed:

    • codex cli works with either of them
    • codex cli does not work when I have neither of them (sanity check)
    • t3code still does not work with either option
  6. Iweisc commented on Mar 13, 2026

    @Iweisc
    Contributor

    seems to be working for me.

  7. ofcljaved commented on Mar 18, 2026

    @ofcljaved

    Hey did anyone of you find a solution I still not able to run t3code it keeps saying MISSING AZURE_API_KEY

  8. locked and limited conversation to collaborators on Aug 15, 2026
  9. converted this issue into a discussion #7045 on Aug 15, 2026
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