Validate API keys without decoding model catalog

This commit is contained in:
Rahul Thathoo
2026-05-11 08:05:59 -07:00
parent 4ec09d3030
commit ce323916de
3 changed files with 98 additions and 11 deletions
+20
View File
@@ -71,6 +71,26 @@ impl<T: HttpTransport> ModelsClient<T> {
Ok((models, header_etag))
}
pub async fn validate_access(
&self,
client_version: &str,
extra_headers: HeaderMap,
) -> Result<(), ApiError> {
self.session
.execute_with(
Method::GET,
Self::path(),
extra_headers,
/*body*/ None,
|req| {
Self::append_client_version_query(req, client_version);
},
)
.await?;
Ok(())
}
}
#[cfg(test)]