Skip to content

OPENAI_USE_CHAT_COMPLETIONS=false is ignored for custom OPENAI_BASE_URL #235

@mzbgf

Description

@mzbgf
$ summarize --version
0.16.3

When I use a custom OPENAI_BASE_URL together with:

{
  "openai": {
    "baseUrl": "https://example-gateway/v1",
    "useChatCompletions": false
  }
}

or set:

OPENAI_USE_CHAT_COMPLETIONS=false

I would expect summarize not to force /chat/completions.

But with a command like:

summarize "https://example.com" --model openai/gpt-5.4

it still goes through /chat/completions when the base URL is custom.

On gateways that expose only the Responses API, that fails. One symptom I saw was:

LLM returned an empty summary (model openai/gpt-5.4).

From reading the current implementation, this seems to come from:

const useChatCompletions = Boolean(forceChatCompletions) || isOpenRouter || isCustomBaseURL;

So a custom base URL overrides OPENAI_USE_CHAT_COMPLETIONS=false / openai.useChatCompletions=false.

Expected behavior: if OPENAI_USE_CHAT_COMPLETIONS=false or openai.useChatCompletions=false, summarize should not force /chat/completions just because OPENAI_BASE_URL is custom.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions