Skip to content

Commit 85360a7

Browse files
committed
docs: some updates to reflect changes
1 parent ef034b2 commit 85360a7

10 files changed

Lines changed: 36 additions & 98 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ GEMINI_API_KEY="your_gemini_api_key_here"
3636
OLLAMA_HOST="your_ollama_server_url_here"
3737

3838
# Vertex AI
39-
# GOGLE_API_KEY="your_google_vertex_api_key_here"
39+
# GOOGLE_API_KEY="your_google_vertex_api_key_here"
4040
# GOOGLE_CLOUD_PROJECT="your_google_cloud_project_id_here"
4141
# GOOGLE_CLOUD_LOCATION="your_google_cloud_location_here"
4242
# GOOGLE_GENAI_VERTEXAI="True"

.github/workflows/publish.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ jobs:
3636
enable-cache: true
3737

3838
- name: Install dependencies and project
39-
run: uv sync --locked --all-extras --dev
40-
41-
- name: Install build dependencies
42-
run: uv pip install build setuptools wheel
39+
run: uv sync --locked --all-extras
4340

4441
- name: Build package
4542
run: uv run python -m build

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5757
- Gemini 3.x models (preview): `gemini-3-flash-preview`, `gemini-3-pro-preview`
5858
- Gemini 2.5.x models: `gemini-2.5-flash`, `gemini-2.5-pro`
5959
- Gemini 2.0.x models: `gemini-2.0-flash`
60-
- Gemini 1.5.x models: `gemini-1.5-flash`, `gemini-1.5-pro`
6160
- Multiple authentication methods: API key, service accounts, ADC, impersonation
6261
- **Thought Signatures**: Automatic handling of Google Gemini 3.x thought signatures
6362
- New optional fields in `Message`, `ProviderResponse`, `ProviderChunk`

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ Allos supports a massive range of models through native integrations and a unive
261261
| **Cohere** | ✅ Ready | Command R+ |
262262
| **Ollama (compat)** | ✅ Ready | OpenAI-compatible endpoint mode |
263263
| **LocalAI / vLLM** | ✅ Ready | Custom endpoints via `chat_completions` |
264+
| **Google** | ✅ Ready | Gemini-3.0 Pro, Gemini-2.5 Flash |
264265

265266
## 🛠️ Built-in Tools
266267

@@ -339,7 +340,7 @@ content_agent.run("Research AI trends and write a blog post")
339340

340341
### 🏗️ Phase 2: Upcoming
341342
- [x] **Native Ollama**: Advanced local model support with tool calling.
342-
- [ ] Google Gemini support
343+
- [x] Google Gemini support
343344
- [ ] Web search and fetch tools
344345
- [ ] Advanced context management
345346
- [ ] Plugin system
@@ -404,6 +405,12 @@ git clone https://github.com/Undiluted7027/allos-agent-sdk.git
404405
cd allos-agent-sdk
405406
```
406407

408+
For better DX, if you are on Linux/MacOS/WSL2, consider:
409+
```bash
410+
chmod +x scripts/setup_dev.sh
411+
./scripts/setup_dev
412+
```
413+
407414
#### Python Environment
408415

409416
##### With `pip`
@@ -416,7 +423,7 @@ source venv/bin/activate
416423
# On Windows: venv\Scripts\activate
417424

418425
# Install in development mode
419-
pip install -e ".[dev]"
426+
pip install -e ".[all, dev]"
420427

421428
# Make the test script executable
422429
chmod +x scripts/run_tests.sh

docs/contributing/adding-providers.md

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -109,42 +109,10 @@ from . import nexusai # Add this line
109109
- Add comprehensive unit tests for your provider in `tests/unit/test_nexusai_provider.py`. Use mocking to avoid making real API calls.
110110
- Add integration tests in `tests/integration/test_nexusai_provider.py`. Mark them with the `run_integration_tests` decorator.
111111

112-
Congratulations! You've successfully extended the Allos SDK with a new provider.
113-
114112
## Advanced: Supporting Thought Signatures
115113

116-
Some LLM providers (like Google Gemini 3.x) use "thought signatures" - encrypted reasoning
117-
state that must be preserved across conversation turns.
118-
119-
If you're implementing a provider that requires this:
120-
121-
1. **Extract thought signatures from the API response**:
122-
```python
123-
def _parse_response(self, response):
124-
thought_signatures = {}
125-
for part in response.parts:
126-
if part.thought_signature:
127-
thought_signatures[part.id] = part.thought_signature
128-
return ProviderResponse(
129-
content=...,
130-
tool_calls=...,
131-
thought_signatures=thought_signatures if thought_signatures else None
132-
)
133-
```
134-
135-
2. **Preserve thought signatures in message conversion**:
136-
```python
137-
def _convert_messages(self, messages: List[Message]):
138-
for msg in messages:
139-
if msg.thought_signatures and msg.tool_calls:
140-
# Include thought signatures when reconstructing tool call parts
141-
for tc in msg.tool_calls:
142-
sig = msg.thought_signatures.get(tc.id)
143-
# Add signature to your API's request format
144-
```
145-
146-
3. **Handle streaming**:
147-
- Accumulate thought signatures across chunks
148-
- Include in final metadata or in specific chunks
114+
Some LLM providers (like Google Gemini 3.x) use "thought signatures" - encrypted reasoning state that must be preserved across conversation turns.
149115

150116
See `allos/providers/google.py` for a complete reference implementation.
117+
118+
Congratulations! You've successfully extended the Allos SDK with a new provider.

docs/contributing/testing.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Our test suite is built with `pytest` and is divided into three main categories.
66
- **End-to-End (E2E) Tests (`tests/e2e/`):** These tests validate the full application flow, primarily through the CLI. They use a **mocked LLM provider** but interact with the **real filesystem and tools**. They **do not** require real API keys to run.
77
- **Integration Tests (`tests/integration/`):** These tests verify the interaction between different parts of our SDK by making **real API calls** to external services (like OpenAI and Anthropic). They are slower, may incur costs, and require API keys and a special flag to run.
88

9+
> [!IMPORTANT]
10+
> **Python 3.10 or higher is required** for the Google (Gemini/Vertex AI) provider related tests. All other provider tests work with Python 3.9+. Use `-m "not_requires_python310"` to skip `GoogleProvider` related tests.
11+
912
## Running Tests
1013

1114
We provide a helper script for the most common testing scenario and command-line flags for more specific needs.
@@ -53,6 +56,9 @@ If you are missing a required API key, pytest will skip the relevant tests and p
5356
**Markers:**
5457
* `@pytest.mark.requires_openai`: Used for tests hitting OpenAI directly OR using the `ChatCompletionsProvider` (which uses the `openai` library).
5558
* `@pytest.mark.requires_anthropic`: Used for tests hitting Anthropic.
59+
* `@pytest.mark.requires_ollama`: Used for tests hitting Ollama.
60+
* `@pytest.mark.requires_gemini`: Used for tests hitting Gemini API.
61+
* `@pytest.mark.requires_vertexai`: Used for tests hitting Google Vertex AI API.
5662

5763
## Writing Tests
5864

docs/guides/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Create and run your first "Hello, World!" application using the Allos agent in u
1010
```
1111
2. **Choose your provider**:
1212

13-
**Option A: Cloud Provider (OpenAI, Anthropic, Groq)**
13+
**Option A: Cloud Provider (OpenAI, Anthropic, Groq, Google)**
1414

1515
Create a `.env` file in your project directory with your API key:
1616
```env

docs/installation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
This guide will walk you through installing the Allos Agent SDK. We recommend using `uv` for the fastest and most reliable experience.
44

5+
## Python Version Requirements
6+
7+
Most providers work with Python 3.10+. However, **Google Gemini/Vertex AI provider requires Python 3.10+** due to dependencies on the Google GenAI SDK and [google-auth library](https://github.com/googleapis/google-auth-library-python).
8+
9+
If you need to use Python 3.9, you can still use all other providers (OpenAI, Anthropic, Ollama, etc.).
10+
511
## Prerequisites
612

7-
- Python 3.10+
13+
- Python 3.9+
814
- We recommend installing `uv`, a next-generation Python package manager.
915

1016
### Installing `uv`
@@ -36,12 +42,6 @@ This installs the core SDK without any specific provider libraries.
3642
uv pip install allos-agent-sdk
3743
```
3844

39-
## Python Version Requirements
40-
41-
Most providers work with Python 3.10+. However, **Google Gemini/Vertex AI provider requires Python 3.10+** due to dependencies on the Google GenAI SDK and [google-auth library](https://github.com/googleapis/google-auth-library-python).
42-
43-
If you need to use Python 3.9, you can still use all other providers (OpenAI, Anthropic, Ollama, etc.).
44-
4545
### Installation with Providers
4646

4747
To use a specific provider, you can install it as an "extra".

docs/providers/google.md

Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,11 @@ provider = ProviderRegistry.get_provider(
239239

240240
| Model | Context Window | Best For |
241241
|-------|---------------|----------|
242-
| `gemini-2.5-flash` | 1,048,576 tokens | Fastest responses, cost-effective |
243-
| `gemini-2.5-pro` | 1,048,576 tokens | Balanced performance |
244-
| `gemini-2.0-flash` | 1,048,576 tokens | Latest flash model |
245-
| `gemini-1.5-flash` | 1,048,576 tokens | Standard fast model |
246-
| `gemini-1.5-pro` | 2,097,152 tokens | Highest quality, largest context |
247-
| `gemini-1.0-pro` | 32,768 tokens | Legacy model |
242+
| `gemini-3-flash-preview` | 1,048,576 tokens | Speed, scale |
243+
| `gemini-3-pro-preview` | 1,048,576 tokens | Multimodality, agentic |
244+
| `gemini-2.5-flash` | 1,048,576 tokens | Low-latency, cost-effective |
245+
| `gemini-2.5-pro` | 1,048,576 tokens | Complex problems |
246+
| `gemini-2.5-flash-lite` | 1,048,576 tokens | Fastest model |
248247

249248
For the latest model availability, refer to:
250249
- [Gemini API Models](https://ai.google.dev/gemini-api/docs/models)
@@ -350,7 +349,7 @@ Function call is missing a thought_signature in functionCall parts
350349

351350
---
352351

353-
## Authentication Priority
352+
## Authentication Precedence
354353

355354
The Google provider checks for authentication in this order:
356355

@@ -475,44 +474,6 @@ allos --active-providers
475474

476475
---
477476

478-
## Migration from Other Providers
479-
480-
### From OpenAI
481-
482-
```python
483-
# OpenAI
484-
from allos import Agent, AgentConfig
485-
486-
config = AgentConfig(
487-
provider_name="openai",
488-
model="gpt-4"
489-
)
490-
491-
# Google (simple replacement)
492-
config = AgentConfig(
493-
provider_name="google",
494-
model="gemini-2.0-flash"
495-
)
496-
```
497-
498-
### From Anthropic
499-
500-
```python
501-
# Anthropic
502-
config = AgentConfig(
503-
provider_name="anthropic",
504-
model="claude-3-5-sonnet-20240620"
505-
)
506-
507-
# Google
508-
config = AgentConfig(
509-
provider_name="google",
510-
model="gemini-1.5-pro" # Similar quality tier
511-
)
512-
```
513-
514-
---
515-
516477
## Best Practices
517478

518479
1. **Use Gemini API for Development**: Simpler setup, faster iteration

docs/reference/provider-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ Different providers have different ways of identifying tool calls. The Allos SDK
6767
>
6868
> - **For most providers (like Anthropic):** The `id` is a straightforward unique identifier for the tool use block.
6969
> - **For OpenAI's Responses API:** The API uses two types of IDs:
70-
- An **item ID** (e.g., `"fc_..."`) that uniquely identifies the `function_call` object in the response list.
71-
- A **correlation ID** or `call_id` (e.g., `"call_..."`) that is used to link the call to its eventual result.
70+
> - An **item ID** (e.g., `"fc_..."`) that uniquely identifies the `function_call` object in the response list.
71+
> - A **correlation ID** or `call_id` (e.g., `"call_..."`) that is used to link the call to its eventual result.
7272
>
7373
> **The `ToolCall.id` in the Allos SDK always stores the correlation ID (`call_id`).** Our `OpenAIProvider` handles the translation and management of the item IDs (`fc_...`) internally, so you only need to work with the correlation ID when building custom tools or inspecting the agent's context.
7474

0 commit comments

Comments
 (0)