Inline completion fails with OpenAI models when using OpenAI subscription/OAuth login.
Describe the bug
Inline completion fails with OpenAI models when using OpenAI subscription/OAuth login. The same completion setup works with Ollama, but OpenAI models consistently throw a NullPointerException.
Tested with:
openai/gpt-4.1openai/gpt-5-mini
Both fail the same way.
To Reproduce
Steps to reproduce the behavior:
- Configure ECA with OpenAI using subscription/OAuth login.
- Set inline completion model to an OpenAI model, e.g.
openai/gpt-4.1. - Trigger inline completion in the editor.
- Completion fails and ECA logs a
NullPointerException.
Relevant config:
{
"defaultModel": "openai/gpt-5.5",
"completion": {
"model": "openai/gpt-4.1"
},
"prompts": {
"completion": "${file:/Users/peppe/.config/eca/prompts/completion.md}"
},
"providers": {
"openai": {
"api": "openai-responses",
"url": "https://api.openai.com"
},
"ollama": {
"url": "http://localhost:11434",
"models": {
"glm-4.7-flash:latest": {
"extraPayload": {
"think": false
},
"limit": {
"context": 32768,
"output": 512
},
"cost": {
"input": 0,
"output": 0
}
}
}
}
}
}
Error log:
10:34:07.337 ERROR [COMPLETION] Error when requesting completion: %s
java.lang.NullPointerException: Stack trace is imprecise, the top frames are missing and/or have wrong line numbers. To get precise stack traces, build the image with option -H:-ReduceImplicitExceptionStackTraceInformation
at eca.llm_providers.openai$base_responses_request_BANG_.invokeStatic(openai.clj:51)
at eca.llm_providers.openai$base_responses_request_BANG_.invoke(openai.clj:51)
at eca.llm_providers.openai$create_response_BANG_.invokeStatic(openai.clj:392)
at eca.llm_providers.openai$create_response_BANG_.invoke(openai.clj:202)
at eca.llm_api$prompt_BANG_.invokeStatic(llm_api.clj:254)
at eca.llm_api$prompt_BANG_.invoke(llm_api.clj:205)
at eca.llm_api$sync_prompt_BANG_.invokeStatic(llm_api.clj:582)
at eca.llm_api$sync_prompt_BANG_.invoke(llm_api.clj:579)
at eca.features.completion$complete$fn__20530.invoke(completion.clj:51)
at clojure.core$binding_conveyor_fn$fn__5844.invoke(core.clj:2047)
at clojure.lang.AFn.call(AFn.java:18)
at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619)
at [email protected]/java.lang.Thread.runWith(Thread.java:1460)
at [email protected]/java.lang.Thread.run(Thread.java:1447)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:832)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:808)
10:34:07.340 INFO [ECA] completion-inline 362ms
Expected behavior
Inline completion should work with OpenAI models when authenticated via OpenAI subscription/OAuth login, or ECA should return a clear provider/authentication error instead of throwing a NullPointerException.
Doctor
Relevant parts from ECA self-debug:
ECA server: 0.136.2
Client: emacs GNU Emacs 30.2
OS: Mac OS X 26.5.1
Java: 24.0.2
Server process:
Command: /opt/homebrew/bin/eca server
Models:
Configured default: openai/gpt-5.5
Models known: 51
Logged providers:
openai: Subscription (oauth), expires 2026-06-17 12:05
Installed via Homebrew:
eca 0.136.2
==> editor-code-assistant/brew/eca: stable 0.136.2
Installed:
editor-code-assistant/brew/eca 0.136.2
Screenshots
Not applicable.
Additional context
Completion works when using Ollama, e.g. ollama/glm-4.7-flash:latest, with the same editor/setup.
The issue seems specific to OpenAI completion through the openai-responses provider path while using OpenAI subscription/OAuth login instead of an API key.
Ok, I pushed improvements so you can see the error on your side, closing this unless it's something more to fix, thank you!
@ericdallo, thank you.
That helped. Error was that "The 'gpt-4.1' model is not supported when using Codex with a ChatGPT account."
I configured gpt-5.4-mini as completion model and completion does work for me now.