omx(team): auto-checkpoint worker-3 [unknown]

This commit is contained in:
bellman
2026-05-15 10:28:12 +09:00
parent dec8efa5c8
commit ea95bf2576
2 changed files with 13 additions and 10 deletions

View File

@@ -146,6 +146,12 @@ impl OpenAiCompatClient {
self
}
#[must_use]
pub fn with_http_client(mut self, http: reqwest::Client) -> Self {
self.http = http;
self
}
#[must_use]
pub fn with_retry_policy(
mut self,

View File

@@ -5,10 +5,10 @@ use std::sync::{Mutex as StdMutex, OnceLock};
use std::time::Duration;
use api::{
ApiError, ContentBlockDelta, ContentBlockDeltaEvent, ContentBlockStartEvent,
ContentBlockStopEvent, InputContentBlock, InputMessage, MessageDeltaEvent, MessageRequest,
OpenAiCompatClient, OpenAiCompatConfig, OutputContentBlock, ProviderClient, StreamEvent,
ToolChoice, ToolDefinition,
build_http_client_with, ApiError, ContentBlockDelta, ContentBlockDeltaEvent,
ContentBlockStartEvent, ContentBlockStopEvent, InputContentBlock, InputMessage,
MessageDeltaEvent, MessageRequest, OpenAiCompatClient, OpenAiCompatConfig, OutputContentBlock,
ProviderClient, ProxyConfig, StreamEvent, ToolChoice, ToolDefinition,
};
use serde_json::json;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
@@ -535,14 +535,11 @@ async fn openai_compatible_client_honors_http_proxy_for_requests() {
)],
)
.await;
let _http_proxy = ScopedEnvVar::set("HTTP_PROXY", proxy.base_url());
let _https_proxy = ScopedEnvVar::unset("HTTPS_PROXY");
let _no_proxy = ScopedEnvVar::unset("NO_PROXY");
let _http_proxy_lower = ScopedEnvVar::unset("http_proxy");
let _https_proxy_lower = ScopedEnvVar::unset("https_proxy");
let _no_proxy_lower = ScopedEnvVar::unset("no_proxy");
let proxied_http = build_http_client_with(&ProxyConfig::from_proxy_url(proxy.base_url()))
.expect("proxy client should build");
let client = OpenAiCompatClient::new("openai-test-key", OpenAiCompatConfig::openai())
.with_http_client(proxied_http)
.with_base_url("http://origin.invalid/v1");
let response = client
.send_message(&MessageRequest {