Files
codex/codex-rs/model-provider/Cargo.toml
Celia Chen 51fdc35945 chore: remove unused Bedrock auth lazy loading (#18948)
## Summary

The Bedrock Mantle SigV4 auth provider currently looks like it can
lazily load `AwsAuthContext`, but the provider is only constructed after
`resolve_auth_method` has already loaded that context. Because
`with_context` always pre-populates the `OnceCell`, the
`get_or_try_init` fallback is unused in normal operation and makes the
provider lifecycle harder to reason about.

This change removes that dead lazy-loading path and makes the actual
behavior explicit:

- `BedrockAuthMethod::AwsSdkAuth` carries only the resolved
`AwsAuthContext`.
- `BedrockMantleSigV4AuthProvider` stores the resolved context directly.
- request signing uses the stored context without going through
`OnceCell`.

The existing eager AWS auth resolution behavior is unchanged; this is a
simplification of the provider state, not a behavior change.

## Testing

- `cargo shear`
- `cargo test -p codex-model-provider`
- `just bazel-lock-check`
2026-04-22 05:01:22 +00:00

27 lines
583 B
TOML

[package]
edition.workspace = true
license.workspace = true
name = "codex-model-provider"
version.workspace = true
[lib]
doctest = false
name = "codex_model_provider"
path = "src/lib.rs"
[lints]
workspace = true
[dependencies]
async-trait = { workspace = true }
codex-api = { workspace = true }
codex-aws-auth = { workspace = true }
codex-client = { workspace = true }
codex-login = { workspace = true }
codex-model-provider-info = { workspace = true }
codex-protocol = { workspace = true }
http = { workspace = true }
[dev-dependencies]
pretty_assertions = { workspace = true }