Merge commit 'refs/pull/481/head' of github-fawney19:fawney19/Aether

# Conflicts:
#	apps/aether-gateway/src/ai_serving/api.rs
#	apps/aether-gateway/src/ai_serving/planner/standard/family/request.rs
#	apps/aether-gateway/src/ai_serving/planner/standard/openai/chat/decision/request.rs
#	apps/aether-gateway/src/ai_serving/planner/standard/openai/responses/decision/request.rs
This commit is contained in:
fawney19
2026-05-19 01:46:41 +08:00
124 changed files with 14402 additions and 702 deletions

View File

@@ -55,7 +55,7 @@ pub(super) fn classify_ai_public_route(
} else if method == http::Method::POST
&& matches!(
normalized_path,
"/v1/images/generations" | "/v1/images/edits" | "/v1/images/variations"
"/v1/images/generations" | "/v1/images/edits"
)
{
Some(classified(

View File

@@ -80,6 +80,28 @@ fn classifies_openai_chat_and_responses_separately_from_embedding() {
assert_ne!(responses.route_kind.as_deref(), Some("embedding"));
}
#[test]
fn classifies_openai_image_generation_and_edit_but_not_variation() {
let headers = headers(&[("authorization", "Bearer sk-test")]);
for path in ["/v1/images/generations", "/v1/images/edits"] {
let uri: Uri = path.parse().expect("uri should parse");
let decision = classify_control_route(&http::Method::POST, &uri, &headers)
.expect("image route should classify");
assert_eq!(decision.route_family.as_deref(), Some("openai"));
assert_eq!(decision.route_kind.as_deref(), Some("image"));
assert_eq!(
decision.auth_endpoint_signature.as_deref(),
Some("openai:image")
);
assert!(decision.is_execution_runtime_candidate());
}
let variation_uri: Uri = "/v1/images/variations".parse().expect("uri should parse");
assert!(classify_control_route(&http::Method::POST, &variation_uri, &headers).is_none());
}
#[test]
fn classifies_models_list_as_claude_when_headers_match() {
let headers = headers(&[