mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Merge remote-tracking branch 'refs/remotes/origin/main' into dev/winston/credentialed-routes-discovery
# Conflicts: # codex-rs/backend-client/src/client.rs # codex-rs/backend-client/src/lib.rs # codex-rs/network-proxy/Cargo.toml # codex-rs/network-proxy/README.md # codex-rs/network-proxy/src/certs.rs # codex-rs/network-proxy/src/proxy.rs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::types::CodeTaskDetailsResponse;
|
||||
use crate::types::ConfigBundleResponse;
|
||||
use crate::types::ConfigFileResponse;
|
||||
use crate::types::ListCredentialRoutesResponse;
|
||||
use crate::types::PaginatedListTaskListItem;
|
||||
@@ -423,6 +424,23 @@ impl Client {
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetch the selected cloud-managed config bundle from codex-backend.
|
||||
///
|
||||
/// `GET /api/codex/config/bundle` (Codex API style) or
|
||||
/// `GET /wham/config/bundle` (ChatGPT backend-api style).
|
||||
pub async fn get_config_bundle(
|
||||
&self,
|
||||
) -> std::result::Result<ConfigBundleResponse, RequestError> {
|
||||
let url = match self.path_style {
|
||||
PathStyle::CodexApi => format!("{}/api/codex/config/bundle", self.base_url),
|
||||
PathStyle::ChatGptApi => format!("{}/wham/config/bundle", self.base_url),
|
||||
};
|
||||
let req = self.http.get(&url).headers(self.headers());
|
||||
let (body, ct) = self.exec_request_detailed(req, "GET", &url).await?;
|
||||
self.decode_json::<ConfigBundleResponse>(&url, &ct, &body)
|
||||
.map_err(RequestError::from)
|
||||
}
|
||||
|
||||
/// Create a new task (user turn) by POSTing to the appropriate backend path
|
||||
/// based on `path_style`. Returns the created task id.
|
||||
pub async fn create_task(&self, request_body: serde_json::Value) -> Result<String> {
|
||||
|
||||
@@ -6,8 +6,12 @@ pub use client::Client;
|
||||
pub use client::RequestError;
|
||||
pub use types::CodeTaskDetailsResponse;
|
||||
pub use types::CodeTaskDetailsResponseExt;
|
||||
pub use types::ConfigBundleResponse;
|
||||
pub use types::ConfigFileResponse;
|
||||
pub use types::CredentialRouteAuthType;
|
||||
pub use types::DeliveredConfigToml;
|
||||
pub use types::DeliveredRequirementsToml;
|
||||
pub use types::DeliveredTomlFragment;
|
||||
pub use types::ListCredentialRoutesResponse;
|
||||
pub use types::PaginatedListTaskListItem;
|
||||
pub use types::ResolvedCredentialRoute;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
pub use codex_backend_openapi_models::models::ConfigBundleResponse;
|
||||
pub use codex_backend_openapi_models::models::ConfigFileResponse;
|
||||
pub use codex_backend_openapi_models::models::CreditStatusDetails;
|
||||
pub use codex_backend_openapi_models::models::DeliveredConfigToml;
|
||||
pub use codex_backend_openapi_models::models::DeliveredRequirementsToml;
|
||||
pub use codex_backend_openapi_models::models::DeliveredTomlFragment;
|
||||
pub use codex_backend_openapi_models::models::PaginatedListTaskListItem;
|
||||
pub use codex_backend_openapi_models::models::PlanType;
|
||||
pub use codex_backend_openapi_models::models::RateLimitReachedKind;
|
||||
|
||||
Reference in New Issue
Block a user