mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-16 02:46:44 +00:00
Stabilize provider compatibility integration verification
Keep integrated G008 provider changes formatted and compile-ready so worker follow-up commits can merge against a clean leader baseline. Constraint: G008 provider verification must pass before ultragoal checkpointing. Confidence: high Scope-risk: narrow Directive: Keep provider compatibility follow-ups rebased on this formatted baseline before retrying failed cherry-picks. Tested: cargo test --manifest-path rust/Cargo.toml -p api providers:: -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p api --test openai_compat_integration -- --nocapture --test-threads=1 Not-tested: full workspace clippy; known pre-existing runtime policy_engine LaneContext clippy warning remains outside this change. Co-authored-by: OmX <omx@oh-my-codex.dev>
This commit is contained in:
@@ -22,8 +22,8 @@ pub use providers::anthropic::{AnthropicClient, AnthropicClient as ApiClient, Au
|
||||
pub use providers::openai_compat::{
|
||||
build_chat_completion_request, check_request_body_size, estimate_request_body_size,
|
||||
flatten_tool_result_content, is_reasoning_model, model_rejects_is_error_field,
|
||||
model_requires_reasoning_content_in_history, translate_message,
|
||||
OpenAiCompatClient, OpenAiCompatConfig,
|
||||
model_requires_reasoning_content_in_history, translate_message, OpenAiCompatClient,
|
||||
OpenAiCompatConfig,
|
||||
};
|
||||
pub use providers::{
|
||||
detect_provider_kind, max_tokens_for_model, max_tokens_for_model_with_override,
|
||||
|
||||
@@ -851,7 +851,10 @@ mod tests {
|
||||
fn provider_capability_matrix_snapshots_openai_compat_differences() {
|
||||
let openai = provider_capabilities_for_model("openai/gpt-4.1-mini");
|
||||
assert_eq!(openai.provider, ProviderKind::OpenAi);
|
||||
assert_eq!(openai.wire_protocol, ProviderWireProtocol::OpenAiChatCompletions);
|
||||
assert_eq!(
|
||||
openai.wire_protocol,
|
||||
ProviderWireProtocol::OpenAiChatCompletions
|
||||
);
|
||||
assert_eq!(openai.auth_env, "OPENAI_API_KEY");
|
||||
assert_eq!(openai.streaming_usage, ProviderFeatureSupport::Supported);
|
||||
assert_eq!(openai.reasoning_effort, ProviderFeatureSupport::Supported);
|
||||
@@ -872,7 +875,10 @@ mod tests {
|
||||
|
||||
let anthropic = provider_capabilities_for_model("claude-sonnet-4-6");
|
||||
assert_eq!(anthropic.provider, ProviderKind::Anthropic);
|
||||
assert_eq!(anthropic.wire_protocol, ProviderWireProtocol::AnthropicMessages);
|
||||
assert_eq!(
|
||||
anthropic.wire_protocol,
|
||||
ProviderWireProtocol::AnthropicMessages
|
||||
);
|
||||
assert_eq!(anthropic.prompt_cache, ProviderFeatureSupport::Supported);
|
||||
assert_eq!(
|
||||
anthropic.custom_parameters,
|
||||
@@ -911,9 +917,9 @@ mod tests {
|
||||
assert!(codes.contains(&"deepseek_v4_reasoning_history"));
|
||||
assert!(codes.contains(&"web_search_passthrough_tool"));
|
||||
assert!(codes.contains(&"web_fetch_passthrough_tool"));
|
||||
assert!(diagnostics.iter().any(|diagnostic| diagnostic
|
||||
.action
|
||||
.contains("provider adapter")));
|
||||
assert!(diagnostics
|
||||
.iter()
|
||||
.any(|diagnostic| diagnostic.action.contains("provider adapter")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1608,6 +1608,7 @@ mod tests {
|
||||
ToolChoice, ToolDefinition, ToolResultContentBlock,
|
||||
};
|
||||
use serde_json::json;
|
||||
use std::collections::BTreeMap;
|
||||
use std::sync::{Mutex, OnceLock};
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user