swarmauri_provider_gemini 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ Copyright 2024 Jacob Stewart
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ swarmauri_provider_gemini
2
+
3
+ Distribution: swarmauri_provider_gemini
4
+ Repository: https://github.com/swarmauri/swarmauri-sdk
5
+
6
+ Author attribution: Jacob Stewart.
7
+ Licensed under Apache-2.0; see LICENSE.
@@ -0,0 +1,321 @@
1
+ Metadata-Version: 2.4
2
+ Name: swarmauri_provider_gemini
3
+ Version: 0.1.0
4
+ Summary: Aggregated Google Gemini provider resources for Swarmauri models.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Keywords: swarmauri,provider,gemini,google,model catalog
9
+ Author: Jacob Stewart
10
+ Author-email: jacob@swarmauri.com
11
+ Requires-Python: >=3.10,<3.15
12
+ Classifier: Development Status :: 1 - Planning
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Dist: swarmauri_base (>=0.11.0,<0.12)
19
+ Requires-Dist: swarmauri_core (>=0.11.0,<0.12)
20
+ Description-Content-Type: text/markdown
21
+
22
+ # swarmauri_provider_gemini
23
+
24
+ <!-- readme-standards:begin branding -->
25
+ <p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
26
+ <p align="center"><strong>swarmauri_provider_gemini</strong></p>
27
+ <p align="center">Aggregated Google Gemini provider resources for Swarmauri models.</p>
28
+ <p align="center">
29
+ <a href="https://pypi.org/project/swarmauri_provider_gemini/"><img alt="pypi: swarmauri_provider_gemini" src="https://img.shields.io/pypi/v/swarmauri_provider_gemini?labelColor=1E293B&amp;color=1D4ED8"></a>
30
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml"><img alt="Source version: 0.1.0" src="https://img.shields.io/static/v1?label=Source%20version&amp;message=0.1.0&amp;labelColor=1E293B&amp;color=4338CA"></a>
31
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml"><img alt="Python: &gt;=3.10,&lt;3.15" src="https://img.shields.io/static/v1?label=Python&amp;message=%3E%3D3.10%2C%3C3.15&amp;labelColor=1E293B&amp;color=0F766E"></a>
32
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml"><img alt="Layer: community" src="https://img.shields.io/static/v1?label=Layer&amp;message=community&amp;labelColor=1E293B&amp;color=6D28D9"></a>
33
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&amp;message=active&amp;labelColor=1E293B&amp;color=166534"></a>
34
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&amp;message=Apache-2.0&amp;labelColor=1E293B&amp;color=86198F"></a>
35
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&amp;message=attribution&amp;labelColor=1E293B&amp;color=86198F"></a>
36
+ </p>
37
+ <p align="center">
38
+ <a href="https://pypi.org/project/swarmauri_provider_gemini/"><img alt="Monthly PyPI downloads: swarmauri_provider_gemini" src="https://img.shields.io/pypi/dm/swarmauri_provider_gemini?labelColor=1E293B&amp;color=0E7490"></a>
39
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md"><img alt="README hits: swarmauri_provider_gemini" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_provider_gemini/README.md.svg?label=README%20hits&amp;labelColor=1E293B&amp;color=0E7490"></a>
40
+ </p>
41
+ <p align="center">
42
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&amp;message=CI%20gate&amp;labelColor=1E293B&amp;color=1D4ED8"></a>
43
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&amp;message=example%20source&amp;labelColor=1E293B&amp;color=0F766E"></a>
44
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&amp;message=not%20certified&amp;labelColor=1E293B&amp;color=92400E"></a>
45
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&amp;message=repository%20policy&amp;labelColor=1E293B&amp;color=4338CA"></a>
46
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&amp;message=source%20and%20CI&amp;labelColor=1E293B&amp;color=6D28D9"></a>
47
+ </p>
48
+ <p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
49
+ <!-- readme-standards:end branding -->
50
+
51
+ ---
52
+
53
+ ## Overview
54
+
55
+ ### Summary
56
+
57
+ [![PyPI](https://img.shields.io/pypi/v/swarmauri_provider_gemini.svg)](https://pypi.org/project/swarmauri_provider_gemini/) [![Python](https://img.shields.io/pypi/pyversions/swarmauri_provider_gemini.svg)](https://pypi.org/project/swarmauri_provider_gemini/) [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE) [![Downloads](https://static.pepy.tech/badge/swarmauri_provider_gemini)](https://pepy.tech/project/swarmauri_provider_gemini) [![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg)](https://hits.sh/github.com/swarmauri/swarmauri-sdk/)
58
+
59
+ ### Why This Package
60
+
61
+ `swarmauri_provider_gemini` isolates this responsibility: Aggregated Google Gemini provider resources for Swarmauri models. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) exposes `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
62
+
63
+ ### When to Use
64
+
65
+ Choose `swarmauri_provider_gemini` when your integration needs aggregated Google Gemini provider resources for Swarmauri models. Match the imports below to your application boundary and install its declared dependencies before using the example.
66
+
67
+ ### Features
68
+
69
+ - Gemini credentials and endpoint configuration.
70
+ - Shared model catalog, error mapping, and tool schema conversion.
71
+ - Reusable by LLM, VLM, and LiveModel packages.
72
+
73
+ ### Non-Goals
74
+
75
+ `swarmauri_provider_gemini` owns aggregated Google Gemini provider resources for Swarmauri models. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
76
+
77
+ ---
78
+
79
+ ## Getting Started
80
+
81
+ ### Prerequisites
82
+
83
+ Python `>=3.10,<3.15` is required. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) declares runtime dependencies including `swarmauri-core`, `swarmauri-base`. Read the example’s inputs and service requirements before execution.
84
+
85
+ ### Installation
86
+
87
+ `uv add swarmauri_provider_gemini` or `pip install swarmauri_provider_gemini`.
88
+
89
+ #### uv
90
+
91
+ <!-- readme-standards:begin installation.uv -->
92
+ ```bash
93
+ uv add swarmauri_provider_gemini
94
+ ```
95
+ <!-- readme-standards:end installation.uv -->
96
+
97
+ #### pip
98
+
99
+ <!-- readme-standards:begin installation.pip -->
100
+ ```bash
101
+ python -m pip install swarmauri_provider_gemini
102
+ ```
103
+ <!-- readme-standards:end installation.pip -->
104
+
105
+ #### Poetry
106
+
107
+ <!-- readme-standards:begin installation.poetry -->
108
+ ```bash
109
+ poetry add swarmauri_provider_gemini
110
+ ```
111
+ <!-- readme-standards:end installation.poetry -->
112
+
113
+ ### Quick Start
114
+
115
+ #### Example
116
+
117
+ <!-- readme-standards:begin example.quick-start -->
118
+ Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/docs/readme/quick_start.py).
119
+
120
+ ```python
121
+ import importlib
122
+
123
+ package = importlib.import_module("swarmauri_provider_gemini")
124
+ assert package.__name__ == "swarmauri_provider_gemini"
125
+ ```
126
+ <!-- readme-standards:end example.quick-start -->
127
+
128
+ #### Expected Result
129
+
130
+ This quick start is explicitly an import smoke check for `swarmauri_provider_gemini`. It confirms that the documented namespace loads; it does not demonstrate or certify a complete application workflow. The detailed source and retained usage guidance below describe the integration boundary.
131
+
132
+ ---
133
+
134
+ ## Usage
135
+
136
+ ### Common Workflows
137
+
138
+ <!-- readme-standards:begin example.usage -->
139
+ Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/docs/readme/usage.py).
140
+
141
+ ```python
142
+ import importlib
143
+
144
+ package = importlib.import_module("swarmauri_provider_gemini")
145
+ assert package.__name__ == "swarmauri_provider_gemini"
146
+ ```
147
+ <!-- readme-standards:end example.usage -->
148
+
149
+ Construct `GeminiProvider(api_key=...)` and inject it into a Gemini model adapter.
150
+
151
+ ### Configuration
152
+
153
+ Configure `swarmauri_provider_gemini` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
154
+
155
+ ### Error Handling
156
+
157
+ The inspected `swarmauri_provider_gemini` source raises `ValueError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
158
+
159
+ ### Best Practices
160
+
161
+ Use the explicit `swarmauri_provider_gemini` imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`; an import or successful installation alone does not establish its runtime guarantees.
162
+
163
+ ---
164
+
165
+ ## Package Boundary
166
+
167
+ ### What It Owns
168
+
169
+ `swarmauri_provider_gemini` is located in `community` and owns aggregated Google Gemini provider resources for Swarmauri models. Source-declared APIs include `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) records its direct dependency boundary.
170
+
171
+ ### Public API and Import Surfaces
172
+
173
+ Import namespace: `swarmauri_provider_gemini`.
174
+
175
+ Source-declared exports or types: `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`.
176
+
177
+ Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) for exact signatures; this inventory does not designate every internal module as stable.
178
+
179
+ ### Entry Points
180
+
181
+ <!-- readme-standards:begin entry-points -->
182
+ - `swarmauri.model_providers` → `GeminiProvider` → `swarmauri_provider_gemini:GeminiProvider`
183
+ <!-- readme-standards:end entry-points -->
184
+
185
+ ### Injected Dependencies
186
+
187
+ The direct installation dependencies of `swarmauri_provider_gemini` are `swarmauri-core`, `swarmauri-base`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py).
188
+
189
+ ### Protocol Consumers
190
+
191
+ Direct consumers in this checkout’s package manifests include `swarmauri_live_model_gemini`. These edges describe declared dependencies, not protocol-conformance evidence.
192
+
193
+ ### Extensions
194
+
195
+ For `swarmauri_provider_gemini`, use the source-declared public interfaces (`GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
196
+
197
+ ---
198
+
199
+ ## Operations and Readiness
200
+
201
+ ### Operational Requirements
202
+
203
+ Operate `swarmauri_provider_gemini` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
204
+
205
+ ### Health and Observability
206
+
207
+ This README does not establish a standalone health endpoint for `swarmauri_provider_gemini`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
208
+
209
+ ### Security and Resource Limits
210
+
211
+ Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py). The `swarmauri_provider_gemini` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
212
+
213
+ ### Compatibility
214
+
215
+ This source version of `swarmauri_provider_gemini` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
216
+
217
+ ---
218
+
219
+ ## Verification
220
+
221
+ ### Tests
222
+
223
+ Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_provider_gemini` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
224
+
225
+ - [tests/unit/test_gemini_provider.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_gemini_provider.py)
226
+ - [tests/unit/test_helper_methods.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_helper_methods.py)
227
+ - [tests/unit/test_package_contract.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_package_contract.py)
228
+
229
+ The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
230
+
231
+ ### Certification Status
232
+
233
+ No external certification is asserted for `swarmauri_provider_gemini` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
234
+
235
+ ### Evidence
236
+
237
+ The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
238
+
239
+ ---
240
+
241
+ ## FAQ
242
+
243
+ ### Why
244
+
245
+ **Why select this package?** `swarmauri_provider_gemini` provides aggregated Google Gemini provider resources for Swarmauri models; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
246
+
247
+ ### How
248
+
249
+ **How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_provider_gemini`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) for the exact types and signatures involved.
250
+
251
+ ### When
252
+
253
+ **When should I validate an upgrade?** Recheck `swarmauri_provider_gemini` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
254
+
255
+ ---
256
+
257
+ ## Documentation and Related Packages
258
+
259
+ ### More Documentation
260
+
261
+ The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) provide the supporting context for `swarmauri_provider_gemini`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
262
+
263
+ ### Related Packages
264
+
265
+ - [swarmauri_base](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/20-bases/swarmauri_base/README.md): Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
266
+ - [swarmauri_core](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/10-interfaces/swarmauri_core/README.md): Core interface contracts and shared types for Swarmauri composable intelligence infrastructure components.
267
+
268
+ ### Project Links
269
+
270
+ <!-- readme-standards:begin project-links -->
271
+ - [pypi: swarmauri_provider_gemini](https://pypi.org/project/swarmauri_provider_gemini/)
272
+ <!-- readme-standards:end project-links -->
273
+
274
+ ---
275
+
276
+ ## Contributing
277
+
278
+ ### How to Contribute
279
+
280
+ Follow the [contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md) and include a focused example or regression for changes to `swarmauri_provider_gemini`. Keep package behavior, its documented boundary, and its tests aligned.
281
+
282
+ ### Development Setup
283
+
284
+ Work from the `pkgs/50-community/swarmauri_provider_gemini` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
285
+
286
+ ### Notes for Maintainers
287
+
288
+ Edit authored prose directly in this `swarmauri_provider_gemini` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
289
+
290
+ ---
291
+
292
+ ## Governance
293
+
294
+ ### Ownership and Decision Making
295
+
296
+ Changes to `swarmauri_provider_gemini` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml); this README does not assign new publishing or administrative authority.
297
+
298
+ ### Standards and Policies
299
+
300
+ `swarmauri_provider_gemini` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
301
+
302
+ ### Lifecycle and Migration
303
+
304
+ The `swarmauri_provider_gemini` source version is `0.1.0`.
305
+
306
+ ---
307
+
308
+ ## License and Attribution
309
+
310
+ ### License
311
+
312
+ <!-- readme-standards:begin license -->
313
+ Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/LICENSE).
314
+ <!-- readme-standards:end license -->
315
+
316
+ ### Notices
317
+
318
+ <!-- readme-standards:begin notices -->
319
+ See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/NOTICE) for attribution.
320
+ <!-- readme-standards:end notices -->
321
+
@@ -0,0 +1,299 @@
1
+ # swarmauri_provider_gemini
2
+
3
+ <!-- readme-standards:begin branding -->
4
+ <p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
5
+ <p align="center"><strong>swarmauri_provider_gemini</strong></p>
6
+ <p align="center">Aggregated Google Gemini provider resources for Swarmauri models.</p>
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/swarmauri_provider_gemini/"><img alt="pypi: swarmauri_provider_gemini" src="https://img.shields.io/pypi/v/swarmauri_provider_gemini?labelColor=1E293B&amp;color=1D4ED8"></a>
9
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml"><img alt="Source version: 0.1.0" src="https://img.shields.io/static/v1?label=Source%20version&amp;message=0.1.0&amp;labelColor=1E293B&amp;color=4338CA"></a>
10
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml"><img alt="Python: &gt;=3.10,&lt;3.15" src="https://img.shields.io/static/v1?label=Python&amp;message=%3E%3D3.10%2C%3C3.15&amp;labelColor=1E293B&amp;color=0F766E"></a>
11
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml"><img alt="Layer: community" src="https://img.shields.io/static/v1?label=Layer&amp;message=community&amp;labelColor=1E293B&amp;color=6D28D9"></a>
12
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&amp;message=active&amp;labelColor=1E293B&amp;color=166534"></a>
13
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&amp;message=Apache-2.0&amp;labelColor=1E293B&amp;color=86198F"></a>
14
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&amp;message=attribution&amp;labelColor=1E293B&amp;color=86198F"></a>
15
+ </p>
16
+ <p align="center">
17
+ <a href="https://pypi.org/project/swarmauri_provider_gemini/"><img alt="Monthly PyPI downloads: swarmauri_provider_gemini" src="https://img.shields.io/pypi/dm/swarmauri_provider_gemini?labelColor=1E293B&amp;color=0E7490"></a>
18
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md"><img alt="README hits: swarmauri_provider_gemini" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_provider_gemini/README.md.svg?label=README%20hits&amp;labelColor=1E293B&amp;color=0E7490"></a>
19
+ </p>
20
+ <p align="center">
21
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&amp;message=CI%20gate&amp;labelColor=1E293B&amp;color=1D4ED8"></a>
22
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&amp;message=example%20source&amp;labelColor=1E293B&amp;color=0F766E"></a>
23
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&amp;message=not%20certified&amp;labelColor=1E293B&amp;color=92400E"></a>
24
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&amp;message=repository%20policy&amp;labelColor=1E293B&amp;color=4338CA"></a>
25
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&amp;message=source%20and%20CI&amp;labelColor=1E293B&amp;color=6D28D9"></a>
26
+ </p>
27
+ <p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
28
+ <!-- readme-standards:end branding -->
29
+
30
+ ---
31
+
32
+ ## Overview
33
+
34
+ ### Summary
35
+
36
+ [![PyPI](https://img.shields.io/pypi/v/swarmauri_provider_gemini.svg)](https://pypi.org/project/swarmauri_provider_gemini/) [![Python](https://img.shields.io/pypi/pyversions/swarmauri_provider_gemini.svg)](https://pypi.org/project/swarmauri_provider_gemini/) [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE) [![Downloads](https://static.pepy.tech/badge/swarmauri_provider_gemini)](https://pepy.tech/project/swarmauri_provider_gemini) [![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg)](https://hits.sh/github.com/swarmauri/swarmauri-sdk/)
37
+
38
+ ### Why This Package
39
+
40
+ `swarmauri_provider_gemini` isolates this responsibility: Aggregated Google Gemini provider resources for Swarmauri models. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) exposes `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
41
+
42
+ ### When to Use
43
+
44
+ Choose `swarmauri_provider_gemini` when your integration needs aggregated Google Gemini provider resources for Swarmauri models. Match the imports below to your application boundary and install its declared dependencies before using the example.
45
+
46
+ ### Features
47
+
48
+ - Gemini credentials and endpoint configuration.
49
+ - Shared model catalog, error mapping, and tool schema conversion.
50
+ - Reusable by LLM, VLM, and LiveModel packages.
51
+
52
+ ### Non-Goals
53
+
54
+ `swarmauri_provider_gemini` owns aggregated Google Gemini provider resources for Swarmauri models. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
55
+
56
+ ---
57
+
58
+ ## Getting Started
59
+
60
+ ### Prerequisites
61
+
62
+ Python `>=3.10,<3.15` is required. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) declares runtime dependencies including `swarmauri-core`, `swarmauri-base`. Read the example’s inputs and service requirements before execution.
63
+
64
+ ### Installation
65
+
66
+ `uv add swarmauri_provider_gemini` or `pip install swarmauri_provider_gemini`.
67
+
68
+ #### uv
69
+
70
+ <!-- readme-standards:begin installation.uv -->
71
+ ```bash
72
+ uv add swarmauri_provider_gemini
73
+ ```
74
+ <!-- readme-standards:end installation.uv -->
75
+
76
+ #### pip
77
+
78
+ <!-- readme-standards:begin installation.pip -->
79
+ ```bash
80
+ python -m pip install swarmauri_provider_gemini
81
+ ```
82
+ <!-- readme-standards:end installation.pip -->
83
+
84
+ #### Poetry
85
+
86
+ <!-- readme-standards:begin installation.poetry -->
87
+ ```bash
88
+ poetry add swarmauri_provider_gemini
89
+ ```
90
+ <!-- readme-standards:end installation.poetry -->
91
+
92
+ ### Quick Start
93
+
94
+ #### Example
95
+
96
+ <!-- readme-standards:begin example.quick-start -->
97
+ Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/docs/readme/quick_start.py).
98
+
99
+ ```python
100
+ import importlib
101
+
102
+ package = importlib.import_module("swarmauri_provider_gemini")
103
+ assert package.__name__ == "swarmauri_provider_gemini"
104
+ ```
105
+ <!-- readme-standards:end example.quick-start -->
106
+
107
+ #### Expected Result
108
+
109
+ This quick start is explicitly an import smoke check for `swarmauri_provider_gemini`. It confirms that the documented namespace loads; it does not demonstrate or certify a complete application workflow. The detailed source and retained usage guidance below describe the integration boundary.
110
+
111
+ ---
112
+
113
+ ## Usage
114
+
115
+ ### Common Workflows
116
+
117
+ <!-- readme-standards:begin example.usage -->
118
+ Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/docs/readme/usage.py).
119
+
120
+ ```python
121
+ import importlib
122
+
123
+ package = importlib.import_module("swarmauri_provider_gemini")
124
+ assert package.__name__ == "swarmauri_provider_gemini"
125
+ ```
126
+ <!-- readme-standards:end example.usage -->
127
+
128
+ Construct `GeminiProvider(api_key=...)` and inject it into a Gemini model adapter.
129
+
130
+ ### Configuration
131
+
132
+ Configure `swarmauri_provider_gemini` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
133
+
134
+ ### Error Handling
135
+
136
+ The inspected `swarmauri_provider_gemini` source raises `ValueError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
137
+
138
+ ### Best Practices
139
+
140
+ Use the explicit `swarmauri_provider_gemini` imports documented below and keep collaborator configuration with the caller. Run the package’s relevant tests after changing `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`; an import or successful installation alone does not establish its runtime guarantees.
141
+
142
+ ---
143
+
144
+ ## Package Boundary
145
+
146
+ ### What It Owns
147
+
148
+ `swarmauri_provider_gemini` is located in `community` and owns aggregated Google Gemini provider resources for Swarmauri models. Source-declared APIs include `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) records its direct dependency boundary.
149
+
150
+ ### Public API and Import Surfaces
151
+
152
+ Import namespace: `swarmauri_provider_gemini`.
153
+
154
+ Source-declared exports or types: `GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`.
155
+
156
+ Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) for exact signatures; this inventory does not designate every internal module as stable.
157
+
158
+ ### Entry Points
159
+
160
+ <!-- readme-standards:begin entry-points -->
161
+ - `swarmauri.model_providers` → `GeminiProvider` → `swarmauri_provider_gemini:GeminiProvider`
162
+ <!-- readme-standards:end entry-points -->
163
+
164
+ ### Injected Dependencies
165
+
166
+ The direct installation dependencies of `swarmauri_provider_gemini` are `swarmauri-core`, `swarmauri-base`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py).
167
+
168
+ ### Protocol Consumers
169
+
170
+ Direct consumers in this checkout’s package manifests include `swarmauri_live_model_gemini`. These edges describe declared dependencies, not protocol-conformance evidence.
171
+
172
+ ### Extensions
173
+
174
+ For `swarmauri_provider_gemini`, use the source-declared public interfaces (`GeminiAuthConfig`, `GeminiEndpoints`, `GeminiErrorMapper`, `GeminiModelCatalog`, `GeminiProvider`, `GeminiToolSchemaConverter`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
175
+
176
+ ---
177
+
178
+ ## Operations and Readiness
179
+
180
+ ### Operational Requirements
181
+
182
+ Operate `swarmauri_provider_gemini` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
183
+
184
+ ### Health and Observability
185
+
186
+ This README does not establish a standalone health endpoint for `swarmauri_provider_gemini`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
187
+
188
+ ### Security and Resource Limits
189
+
190
+ Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py). The `swarmauri_provider_gemini` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
191
+
192
+ ### Compatibility
193
+
194
+ This source version of `swarmauri_provider_gemini` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
195
+
196
+ ---
197
+
198
+ ## Verification
199
+
200
+ ### Tests
201
+
202
+ Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_provider_gemini` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
203
+
204
+ - [tests/unit/test_gemini_provider.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_gemini_provider.py)
205
+ - [tests/unit/test_helper_methods.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_helper_methods.py)
206
+ - [tests/unit/test_package_contract.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_package_contract.py)
207
+
208
+ The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
209
+
210
+ ### Certification Status
211
+
212
+ No external certification is asserted for `swarmauri_provider_gemini` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
213
+
214
+ ### Evidence
215
+
216
+ The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
217
+
218
+ ---
219
+
220
+ ## FAQ
221
+
222
+ ### Why
223
+
224
+ **Why select this package?** `swarmauri_provider_gemini` provides aggregated Google Gemini provider resources for Swarmauri models; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
225
+
226
+ ### How
227
+
228
+ **How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_provider_gemini`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py) for the exact types and signatures involved.
229
+
230
+ ### When
231
+
232
+ **When should I validate an upgrade?** Recheck `swarmauri_provider_gemini` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
233
+
234
+ ---
235
+
236
+ ## Documentation and Related Packages
237
+
238
+ ### More Documentation
239
+
240
+ The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/swarmauri_provider_gemini/__init__.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml) provide the supporting context for `swarmauri_provider_gemini`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
241
+
242
+ ### Related Packages
243
+
244
+ - [swarmauri_base](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/20-bases/swarmauri_base/README.md): Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
245
+ - [swarmauri_core](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/10-interfaces/swarmauri_core/README.md): Core interface contracts and shared types for Swarmauri composable intelligence infrastructure components.
246
+
247
+ ### Project Links
248
+
249
+ <!-- readme-standards:begin project-links -->
250
+ - [pypi: swarmauri_provider_gemini](https://pypi.org/project/swarmauri_provider_gemini/)
251
+ <!-- readme-standards:end project-links -->
252
+
253
+ ---
254
+
255
+ ## Contributing
256
+
257
+ ### How to Contribute
258
+
259
+ Follow the [contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md) and include a focused example or regression for changes to `swarmauri_provider_gemini`. Keep package behavior, its documented boundary, and its tests aligned.
260
+
261
+ ### Development Setup
262
+
263
+ Work from the `pkgs/50-community/swarmauri_provider_gemini` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
264
+
265
+ ### Notes for Maintainers
266
+
267
+ Edit authored prose directly in this `swarmauri_provider_gemini` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
268
+
269
+ ---
270
+
271
+ ## Governance
272
+
273
+ ### Ownership and Decision Making
274
+
275
+ Changes to `swarmauri_provider_gemini` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/pyproject.toml); this README does not assign new publishing or administrative authority.
276
+
277
+ ### Standards and Policies
278
+
279
+ `swarmauri_provider_gemini` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
280
+
281
+ ### Lifecycle and Migration
282
+
283
+ The `swarmauri_provider_gemini` source version is `0.1.0`.
284
+
285
+ ---
286
+
287
+ ## License and Attribution
288
+
289
+ ### License
290
+
291
+ <!-- readme-standards:begin license -->
292
+ Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/LICENSE).
293
+ <!-- readme-standards:end license -->
294
+
295
+ ### Notices
296
+
297
+ <!-- readme-standards:begin notices -->
298
+ See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/NOTICE) for attribution.
299
+ <!-- readme-standards:end notices -->
@@ -0,0 +1,87 @@
1
+ [project]
2
+ name = "swarmauri_provider_gemini"
3
+ version = "0.1.0"
4
+ description = "Aggregated Google Gemini provider resources for Swarmauri models."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10,<3.15"
7
+ authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
8
+ license = "Apache-2.0"
9
+ dependencies = ["swarmauri_core<0.12,>=0.11.0", "swarmauri_base<0.12,>=0.11.0"]
10
+ classifiers = [
11
+ "Development Status :: 1 - Planning",
12
+ "Programming Language :: Python :: 3.10",
13
+ "Programming Language :: Python :: 3.11",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Programming Language :: Python :: 3.14",
17
+ ]
18
+ keywords = ["swarmauri", "provider", "gemini", "google", "model catalog"]
19
+ license-files = ["LICENSE", "NOTICE"]
20
+
21
+ [tool.uv.sources]
22
+ swarmauri_core = { workspace = true }
23
+ swarmauri_base = { workspace = true }
24
+
25
+ [tool.readme_standards]
26
+ policy = "package-guide-v1"
27
+ readme = "README.md"
28
+ brand = "swarmauri"
29
+ brand_catalog = "../../../tools/readme/brands.toml"
30
+ repository = "https://github.com/swarmauri/swarmauri-sdk"
31
+ ref = "master"
32
+ package_path = "pkgs/50-community/swarmauri_provider_gemini"
33
+ layer = "community"
34
+ lifecycle = "active"
35
+ license_file = "LICENSE"
36
+ notice_file = "NOTICE"
37
+
38
+ [tool.readme_standards.distributions.pypi]
39
+ name = "swarmauri_provider_gemini"
40
+ published = true
41
+
42
+ [tool.readme_standards.examples.quick_start]
43
+ source = "docs/readme/quick_start.py"
44
+ test = "tests/unit/test_readme_sources.py"
45
+ language = "python"
46
+ expected_exit_code = 0
47
+
48
+ [tool.readme_standards.examples.usage]
49
+ source = "docs/readme/usage.py"
50
+ test = "tests/unit/test_readme_sources.py"
51
+ language = "python"
52
+ expected_exit_code = 0
53
+
54
+ [tool.readme_standards.statuses.readme]
55
+ label = "CI gate"
56
+ url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
57
+
58
+ [tool.readme_standards.statuses.tests]
59
+ label = "example source"
60
+ url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/tests/unit/test_readme_sources.py"
61
+
62
+ [tool.readme_standards.statuses.certification]
63
+ label = "not certified"
64
+ url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_provider_gemini/README.md#certification-status"
65
+
66
+ [tool.readme_standards.statuses.governance]
67
+ label = "repository policy"
68
+ url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"
69
+
70
+ [tool.readme_standards.statuses.evidence]
71
+ label = "source and CI"
72
+ url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
73
+ [project.entry-points."swarmauri.model_providers"]
74
+ GeminiProvider = "swarmauri_provider_gemini:GeminiProvider"
75
+
76
+ [build-system]
77
+ requires = ["poetry-core>=1.8.0"]
78
+ build-backend = "poetry.core.masonry.api"
79
+
80
+ [dependency-groups]
81
+ dev = ["pytest>=8.0", "ruff>=0.9.9", "swarmauri_tests_component", "readme-standards==0.1.3; python_version >= \"3.11\""]
82
+
83
+ [tool.ruff]
84
+ extend = "../../pyproject.toml"
85
+
86
+ [tool.ruff.lint]
87
+ ignore = ["N999", "RUF012"]
@@ -0,0 +1,27 @@
1
+ from collections.abc import Mapping
2
+ from typing import Literal
3
+
4
+ from pydantic import Field, SecretStr
5
+ from swarmauri_base.model_providers.ProviderAuthBase import ProviderAuthBase
6
+ from swarmauri_base.ComponentBase import ComponentBase
7
+
8
+
9
+ @ComponentBase.register_type(ProviderAuthBase, "GeminiAuthConfig")
10
+ class GeminiAuthConfig(ProviderAuthBase):
11
+ api_key: SecretStr | None = Field(default=None, exclude=True)
12
+ vertex_project: str | None = None
13
+ vertex_location: str | None = None
14
+ type: Literal["GeminiAuthConfig"] = "GeminiAuthConfig"
15
+
16
+ def apply(self, headers: Mapping[str, str]) -> dict[str, str]:
17
+ authorized = dict(headers)
18
+ if self.api_key is not None:
19
+ authorized["x-goog-api-key"] = self.api_key.get_secret_value()
20
+ return authorized
21
+
22
+ def apply_query(self, query: Mapping[str, str]) -> dict[str, str]:
23
+ authorized = dict(query)
24
+ if self.api_key is None:
25
+ raise ValueError("GeminiProvider requires an api_key")
26
+ authorized["key"] = self.api_key.get_secret_value()
27
+ return authorized
@@ -0,0 +1,28 @@
1
+ from typing import Literal
2
+
3
+ from swarmauri_base.model_providers.ProviderEndpointBase import (
4
+ ProviderEndpointBase,
5
+ )
6
+ from swarmauri_base.ComponentBase import ComponentBase
7
+
8
+
9
+ @ComponentBase.register_type(ProviderEndpointBase, "GeminiEndpoints")
10
+ class GeminiEndpoints(ProviderEndpointBase):
11
+ base_url: str = "https://generativelanguage.googleapis.com/v1beta"
12
+ websocket_url: str = (
13
+ "wss://generativelanguage.googleapis.com/ws/"
14
+ "google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent"
15
+ )
16
+ type: Literal["GeminiEndpoints"] = "GeminiEndpoints"
17
+
18
+ def resolve(self, capability: str) -> str:
19
+ endpoints = {
20
+ "api": self.base_url,
21
+ "live.connect": self.websocket_url,
22
+ }
23
+ try:
24
+ return endpoints[capability]
25
+ except KeyError as error:
26
+ raise ValueError(
27
+ f"Gemini does not support capability {capability!r}"
28
+ ) from error
@@ -0,0 +1,16 @@
1
+ from typing import Any, Literal
2
+
3
+ from swarmauri_base.model_providers.ProviderErrorMapperBase import (
4
+ ProviderErrorMapperBase,
5
+ )
6
+ from swarmauri_base.ComponentBase import ComponentBase
7
+
8
+
9
+ @ComponentBase.register_type(ProviderErrorMapperBase, "GeminiErrorMapper")
10
+ class GeminiErrorMapper(ProviderErrorMapperBase):
11
+ type: Literal["GeminiErrorMapper"] = "GeminiErrorMapper"
12
+
13
+ def map_error(self, error: BaseException | Any) -> BaseException:
14
+ if isinstance(error, BaseException):
15
+ return RuntimeError(f"Gemini provider error: {error}")
16
+ return RuntimeError(f"Gemini provider error: {error}")
@@ -0,0 +1,17 @@
1
+ from typing import Literal
2
+
3
+ from swarmauri_base.model_providers.ModelCatalogBase import ModelCatalogBase
4
+ from swarmauri_base.ComponentBase import ComponentBase
5
+
6
+
7
+ @ComponentBase.register_type(ModelCatalogBase, "GeminiModelCatalog")
8
+ class GeminiModelCatalog(ModelCatalogBase):
9
+ models: dict = {
10
+ "gemini-3.1-flash-live-preview": {
11
+ "name": "gemini-3.1-flash-live-preview",
12
+ "input_modalities": ["text", "audio", "image", "video"],
13
+ "output_modalities": ["audio", "text"],
14
+ "features": ["realtime", "tools", "transcription"],
15
+ }
16
+ }
17
+ type: Literal["GeminiModelCatalog"] = "GeminiModelCatalog"
@@ -0,0 +1,46 @@
1
+ from typing import Literal
2
+
3
+ from pydantic import Field, model_validator
4
+ from swarmauri_base.ComponentBase import ComponentBase
5
+ from swarmauri_base.model_providers.ModelProviderBase import ModelProviderBase
6
+ from swarmauri_base.model_providers.ProviderConnectionConfig import (
7
+ ProviderConnectionConfig,
8
+ )
9
+
10
+ from .GeminiAuthConfig import GeminiAuthConfig
11
+ from .GeminiEndpoints import GeminiEndpoints
12
+ from .GeminiErrorMapper import GeminiErrorMapper
13
+ from .GeminiModelCatalog import GeminiModelCatalog
14
+
15
+
16
+ @ComponentBase.register_type(ModelProviderBase, "GeminiProvider")
17
+ class GeminiProvider(ModelProviderBase):
18
+ provider_name: Literal["gemini"] = "gemini"
19
+ endpoints: GeminiEndpoints = Field(default_factory=GeminiEndpoints)
20
+ auth: GeminiAuthConfig = Field(
21
+ default_factory=GeminiAuthConfig, exclude=True
22
+ )
23
+ catalog: GeminiModelCatalog = Field(default_factory=GeminiModelCatalog)
24
+ error_mapper: GeminiErrorMapper = Field(default_factory=GeminiErrorMapper)
25
+ type: Literal["GeminiProvider"] = "GeminiProvider"
26
+
27
+ @model_validator(mode="after")
28
+ def configure(self) -> "GeminiProvider":
29
+ self.base_url = self.base_url or self.endpoints.resolve("api")
30
+ self.endpoints.base_url = self.base_url
31
+ if self.api_key is not None:
32
+ self.auth.api_key = self.api_key
33
+ elif self.auth.api_key is not None:
34
+ self.api_key = self.auth.api_key
35
+ return self
36
+
37
+ def prepare_connection(
38
+ self, capability: str, model: str | None = None
39
+ ) -> ProviderConnectionConfig:
40
+ if capability != "live.connect":
41
+ return super().prepare_connection(capability, model)
42
+
43
+ config = self.connection_config(capability, model)
44
+ return config.model_copy(
45
+ update={"query": dict(self.auth.apply_query(config.query))}
46
+ )
@@ -0,0 +1,27 @@
1
+ from typing import Any
2
+
3
+
4
+ class GeminiToolSchemaConverter:
5
+ def convert(self, tool: Any) -> dict[str, Any]:
6
+ parameters = getattr(tool, "parameters", [])
7
+ properties = {
8
+ parameter.name: {
9
+ "type": getattr(parameter, "type", "string"),
10
+ "description": getattr(parameter, "description", None),
11
+ }
12
+ for parameter in parameters
13
+ }
14
+ required = [
15
+ parameter.name
16
+ for parameter in parameters
17
+ if getattr(parameter, "required", False)
18
+ ]
19
+ return {
20
+ "name": tool.name,
21
+ "description": getattr(tool, "description", None),
22
+ "parameters": {
23
+ "type": "object",
24
+ "properties": properties,
25
+ "required": required,
26
+ },
27
+ }
@@ -0,0 +1,15 @@
1
+ from .GeminiAuthConfig import GeminiAuthConfig
2
+ from .GeminiEndpoints import GeminiEndpoints
3
+ from .GeminiErrorMapper import GeminiErrorMapper
4
+ from .GeminiModelCatalog import GeminiModelCatalog
5
+ from .GeminiProvider import GeminiProvider
6
+ from .GeminiToolSchemaConverter import GeminiToolSchemaConverter
7
+
8
+ __all__ = [
9
+ "GeminiAuthConfig",
10
+ "GeminiEndpoints",
11
+ "GeminiErrorMapper",
12
+ "GeminiModelCatalog",
13
+ "GeminiProvider",
14
+ "GeminiToolSchemaConverter",
15
+ ]