Skip to content

Allow native OpenAI Responses API to use custom base URL #343

@chyax98

Description

@chyax98

Problem

The native openai-api provider uses the OpenAI Responses API, but its base URL is currently hardcoded to https://api.openai.com/v1.

That means users with a local/proxied Responses API endpoint cannot configure openai-api to use it. The available openai-compatible configuration path is not equivalent because it targets the OpenAI-compatible chat/completions protocol rather than the native Responses API path.

Reproduction

  1. Run a local Responses API endpoint at http://127.0.0.1:8317/v1.
  2. Configure OPENAI_API_KEY and try to set OPENAI_BASE_URL, OPENAI_API_BASE, or JCODE_OPENAI_API_BASE.
  3. Run:
jcode -p openai-api -m gpt-5.5 run 'hello'

Actual behavior

openai-api still sends requests to https://api.openai.com/v1/responses.

Expected behavior

openai-api should continue using /responses, but allow a custom API base URL for API-key based usage.

Notes

This should remain distinct from openai-compatible, which is a separate provider/protocol path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions