eca icon indicating copy to clipboard operation
eca copied to clipboard

issue about openai model context window

Open RCmerci opened this issue 8 months ago • 12 comments

Describe the bug

I'm using the openai/gpt-5.3-codex model. In eca-emacs, the displayed context window is 400K, but in reality it should be around 270K.

When the context reaches 271.3K, it returns an error like this:

Your input exceeds the context window of this model. Please adjust your input and try again.

In codex-cli, this model’s context window is shown as 258K. Image

To Reproduce

Steps to reproduce the behavior:

Expected behavior

A clear and concise description of what you expected to happen.

Doctor

ECA version: 0.120.1

Server cmd: /Users/rcmerci/.emacs.d/eca/eca server --log-level debug

Workspaces: /Users/rcmerci/gh-repos/logseq

Default model: openai/gpt-5.3-codex (Subscription (oauth), expires 2026-04-07 21:03)

Logged providers: openai: Subscription (oauth), expires 2026-04-07 21:03

Relevant env vars:

Credential files: None found

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

RCmerci avatar Mar 31 '26 07:03 RCmerci

@RCmerci we get the context windows and details from https://models.dev/?search=5.3-codex, I wonder what makes yours 270k limit. Any guess @zikajk ?

ericdallo avatar Mar 31 '26 11:03 ericdallo

Image maybe we should use an input limit(272K)? We're currently using a context limit(400K)

RCmerci avatar Mar 31 '26 12:03 RCmerci

@RCmerci no, input limit is really the input tokens, the ones we send, context limit is the sum of input + output tokens limits

ericdallo avatar Mar 31 '26 12:03 ericdallo

I don’t really understand the details of LLMs. My understanding is: input limit + output limit = context window when the input in a single request exceeds 272,000, the above error appears:

Your input exceeds the context window of this model. Please adjust your input and try again.

So, we need to /compact before input > 270k (I guess)

RCmerci avatar Mar 31 '26 12:03 RCmerci

@ericdallo I guess we would have to sum input / output tokens in ECA and do something about it. @RCmerci Do you know why I don't see this limit in my Codex?

zikajk avatar Mar 31 '26 12:03 zikajk

Do you know why I don't see this limit in my Codex? /status

Image

RCmerci avatar Mar 31 '26 12:03 RCmerci

@RCmerci And now it is there (you must write something to see it). Here is more context explaining those numbers vs 400k limit: https://github.com/openai/codex/issues/9429

zikajk avatar Mar 31 '26 12:03 zikajk

I’m a little confused now.. could this issue be a bug in ECA? or what can I do right now to work around this issue

RCmerci avatar Mar 31 '26 12:03 RCmerci

You can try to revert to some previous message and run /compact. It is not really a bug. What happened is that your input exceeded the 271k but the whole session allows 400k. Unfortunately, we don't support special handling of input/output token limits (yet)

zikajk avatar Mar 31 '26 12:03 zikajk

You can try to revert to some previous message and run /compact.

OK, got it

Unfortunately, we don't support special handling of input/output token limits

I roughly understand it now: ECA currently performs automatic compaction against ~400K limit, but openai/gpt-5.3-codex throws an error when the input exceeds the input limit (271K).

RCmerci avatar Mar 31 '26 12:03 RCmerci

should I close this issue now or keep it open for you?

RCmerci avatar Mar 31 '26 12:03 RCmerci

I think we can close and open a new one about how to control better input limit handling, TBH not sure what would be our options

ericdallo avatar Mar 31 '26 12:03 ericdallo