mirror of
https://github.com/openai/codex.git
synced 2026-04-29 17:06:51 +00:00
## Summary - reduce public module visibility across Rust crates, preferring private or crate-private modules with explicit crate-root public exports - update external call sites and tests to use the intended public crate APIs instead of reaching through module trees - add the module visibility guideline to AGENTS.md ## Validation - `cargo check --workspace --all-targets --message-format=short` passed before the final fix/format pass - `just fix` completed successfully - `just fmt` completed successfully - `git diff --check` passed
30 lines
952 B
Rust
30 lines
952 B
Rust
pub(crate) mod cache;
|
|
pub mod collaboration_mode_presets;
|
|
pub(crate) mod config;
|
|
pub mod manager;
|
|
pub mod model_info;
|
|
pub mod model_presets;
|
|
|
|
pub use codex_app_server_protocol::AuthMode;
|
|
pub use codex_login::AuthManager;
|
|
pub use codex_login::CodexAuth;
|
|
pub use codex_model_provider_info::ModelProviderInfo;
|
|
pub use codex_model_provider_info::WireApi;
|
|
pub use config::ModelsManagerConfig;
|
|
|
|
/// Load the bundled model catalog shipped with `codex-models-manager`.
|
|
pub fn bundled_models_response()
|
|
-> std::result::Result<codex_protocol::openai_models::ModelsResponse, serde_json::Error> {
|
|
serde_json::from_str(include_str!("../models.json"))
|
|
}
|
|
|
|
/// Convert the client version string to a whole version string (e.g. "1.2.3-alpha.4" -> "1.2.3").
|
|
pub fn client_version_to_whole() -> String {
|
|
format!(
|
|
"{}.{}.{}",
|
|
env!("CARGO_PKG_VERSION_MAJOR"),
|
|
env!("CARGO_PKG_VERSION_MINOR"),
|
|
env!("CARGO_PKG_VERSION_PATCH")
|
|
)
|
|
}
|