codex-helper-core 0.17.0

Core library for codex-helper.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use axum::Json;

use super::super::{
    CodexRelayCapabilitiesRequest, CodexRelayCapabilitiesResponse, ProxyControlError, ProxyService,
};

pub(in crate::proxy) async fn codex_relay_capabilities(
    proxy: ProxyService,
    Json(payload): Json<CodexRelayCapabilitiesRequest>,
) -> Result<Json<CodexRelayCapabilitiesResponse>, (axum::http::StatusCode, String)> {
    proxy
        .codex_relay_capabilities(payload)
        .await
        .map(Json)
        .map_err(ProxyControlError::into_http_error)
}