Skip to main content

gadk_model/
lib.rs

1// Copyright 2026 Chris Olson
2// Portions derived from ADK-Go (https://github.com/google/adk-go), Copyright 2026 Google LLC.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//     http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! gadk-model: the LLM abstraction, the model registry, the HTTP seam and the shared SSE parser
17//! ([`sse`]).
18
19mod aggregator;
20mod convert;
21mod error;
22#[cfg(feature = "gcp-auth")]
23pub mod gcp_auth;
24mod go_json;
25mod http;
26mod jsonpath;
27mod live;
28mod live_artifacts;
29mod llm;
30mod registry;
31pub mod rest;
32pub mod sse;
33mod variant;
34
35pub use aggregator::StreamingResponseAggregator;
36pub use convert::llm_response_from_genai;
37pub use error::{ModelError, api_error_from_body, body_prefix};
38pub use go_json::to_go_json;
39pub use http::{
40    BodyStream, HttpClient, ReqwestClient, collect_body, error_chain, redact_url,
41    transport_error_detail,
42};
43pub use live::{LiveConnError, LiveConnErrorKind, LiveConnection, RealtimeInput};
44pub use live_artifacts::{LIVE_ARTIFACT_NAMESPACE, is_internal_live_artifact_part};
45pub use llm::{Backend, ExtrasRequestProvider, HttpOptions, Llm, LlmRequest, LlmResponse};
46pub use registry::*;
47pub use variant::{
48    can_use_output_schema_with_tools, google_variant, is_gemini_3x_live,
49    is_gemini_35_live_translate, is_gemini_api_variant, is_gemini_model, is_gemini1_model,
50    is_gemini2_or_above, is_gemini25_or_lower, needs_output_schema_processor,
51};