pakrym-oai and GitHub
dac5f07403
[codex] Add context remaining tool ( #27518 )
...
## Why
The token budget feature can inject remaining-context notices into
model-visible context, but the model does not have a direct way to ask
for that same remaining-token fragment on demand.
This PR adds a small model tool for the token budget feature so the
model can request the current remaining context window message without
duplicating the fragment format.
## What changed
- Adds a `get_context_remaining` direct-model tool behind
`Feature::TokenBudget`.
- Renders the tool output through `TokenBudgetRemainingContext`,
matching the existing budget message shape.
- Registers the tool alongside `new_context` in the token budget tool
set.
- Adds integration coverage that verifies the tool is exposed and
returns the same `<token_budget>` remaining fragment already present in
context.
## Validation
- `just test -p codex-core token_budget`
2026-06-11 04:17:10 +00:00
..
2026-06-11 03:39:07 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 14:21:28 +02:00
2026-03-27 19:00:44 -07:00
2026-05-27 11:09:33 -07:00
2026-06-09 20:51:57 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-06-10 12:19:26 -07:00
2026-06-10 08:47:16 -07:00
2026-06-10 08:47:16 -07:00
2026-06-10 19:21:24 -07:00
2026-05-14 16:15:56 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-09 17:54:32 -07:00
2026-06-08 13:55:15 -07:00
2026-06-11 04:11:26 +00:00
2026-05-14 18:04:26 -07:00
2026-06-08 13:55:15 -07:00
2026-05-28 15:26:55 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-05-14 12:40:01 -07:00
2026-05-29 10:22:27 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-05-22 16:58:14 +00:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:07:06 -07:00
2026-05-18 21:03:51 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-06-08 13:55:15 -07:00
2026-05-15 01:26:50 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-02 12:10:14 +02:00
2026-06-10 20:42:55 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-04 12:43:07 -07:00
2026-06-08 13:55:15 -07:00
2026-06-09 17:54:32 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-05-19 14:45:37 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:43:03 -07:00
2026-06-11 04:11:26 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-06-01 04:33:20 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-05-14 16:15:56 -07:00
2026-05-18 09:57:54 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-09 19:51:54 +02:00
2026-06-11 04:17:10 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-03-11 12:33:09 -07:00
2026-06-08 13:55:15 -07:00
2026-06-09 15:10:17 -07:00
2026-06-01 23:33:42 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-10 20:42:55 -07:00
2026-04-28 23:01:40 +00:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-03 15:33:34 -07:00