mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-13 14:40:20 +08:00
fix(ci): stabilize cross-platform workflow checks
This commit is contained in:
@@ -541,10 +541,11 @@ fn build_configured_claude_count_tokens_url(
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty());
|
||||
let path = path?;
|
||||
let path = path
|
||||
.starts_with('/')
|
||||
.then(|| path.to_string())
|
||||
.unwrap_or_else(|| format!("/{path}"));
|
||||
let path = if path.starts_with('/') {
|
||||
path.to_string()
|
||||
} else {
|
||||
format!("/{path}")
|
||||
};
|
||||
build_passthrough_path_url(
|
||||
&transport.endpoint.base_url,
|
||||
path.as_str(),
|
||||
|
||||
@@ -1018,7 +1018,7 @@ mod tests {
|
||||
.expect("headers should build")
|
||||
};
|
||||
assert!(
|
||||
build_headers(compat_behavior, None).get("x-app").is_none(),
|
||||
!build_headers(compat_behavior, None).contains_key("x-app"),
|
||||
"compatibility profile must not impersonate the Claude Code transport"
|
||||
);
|
||||
assert_eq!(
|
||||
@@ -1029,12 +1029,11 @@ mod tests {
|
||||
"Claude Code transport headers must survive a transparent body profile"
|
||||
);
|
||||
assert!(
|
||||
build_headers(
|
||||
!build_headers(
|
||||
native_behavior,
|
||||
Some(aether_ai_formats::ApiOperation::ClaudeCountTokens),
|
||||
)
|
||||
.get("anthropic-beta")
|
||||
.is_none(),
|
||||
.contains_key("anthropic-beta"),
|
||||
"native transparent token counting must not inject compatibility betas"
|
||||
);
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user