mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
## What changed Allow successful synchronous `PostModelRequest` MCP hooks to return `extra_codex_rollout_budget_units` in `structuredContent`. Add these charges to rollout spending while preserving provider usage separately, including completed responses without token usage and incomplete responses with reported usage. Validate prices as finite and nonnegative. Preserve valid sibling charges when another hook reports an invalid price, and surface accounting failures without retrying inference. Carry hook charges and overflow information through host accounting and enforce local budget limits. ## Testing Extend coverage for hook-driven budget exhaustion, failed hooks, overflow, interrupted responses, and foreground and background compaction accounting. GitOrigin-RevId: dc54ba53478d82848bcafb55ecef88215019d09f
45 lines
1.3 KiB
TOML
45 lines
1.3 KiB
TOML
[package]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "codex-hooks"
|
|
version.workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
name = "codex_hooks"
|
|
path = "src/lib.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
codex-utils-process = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
async-channel = { workspace = true }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
codex-config = { workspace = true }
|
|
codex-plugin = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
codex-utils-output-truncation = { workspace = true }
|
|
codex-utils-path-uri = { workspace = true }
|
|
futures = { workspace = true, features = ["alloc"] }
|
|
regex = { workspace = true }
|
|
schemars = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
serde_path_to_error = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
tokio = { workspace = true, features = ["fs", "io-util", "process", "sync", "time"] }
|
|
tracing = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
|
|
[dev-dependencies]
|
|
libc = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] }
|
|
|
|
[target.'cfg(any(unix, windows))'.dependencies]
|
|
codex-utils-pty = { workspace = true }
|