Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to the Metorial Python SDK will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.3.3] - 2026-06-12

### Changed

- Replaced the deprecated `google-generativeai` dependency with `google-genai`. The old SDK pinned `protobuf < 6`, which caused install conflicts with packages requiring protobuf 6+; `google-genai` has no protobuf dependency. The Google adapter is duck-typed and never imported `google.generativeai` directly, so clients built with either SDK continue to work.

## [2.3.2] - 2026-03-30

### Added
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This SDK formats MCP tools for each LLM provider. Pass the `provider` parameter
| ------------- | ----------------------- | --------------------- | ------------------------------------------ |
| OpenAI | `provider="openai"` | `openai` | `gpt-4.1`, `gpt-4o`, `o1`, `o3` |
| Anthropic | `provider="anthropic"` | `anthropic` | `claude-sonnet-4-5`, `claude-opus-4` |
| Google Gemini | `provider="google"` | `google-generativeai` | `gemini-2.5-pro`, `gemini-2.5-flash` |
| Google Gemini | `provider="google"` | `google-genai` | `gemini-2.5-pro`, `gemini-2.5-flash` |
| Mistral | `provider="mistral"` | `mistralai` | `mistral-large-latest`, `codestral-latest` |
| DeepSeek | `provider="deepseek"` | `openai` (compatible) | `deepseek-chat`, `deepseek-reasoner` |
| Together AI | `provider="togetherai"` | `openai` (compatible) | `Llama-4`, `Qwen-3` |
Expand Down Expand Up @@ -359,11 +359,12 @@ if response.stop_reason == "tool_use":

```python
import os
import google.generativeai as genai
from google import genai
from google.genai import types
from metorial import Metorial, metorial_google

metorial = Metorial(api_key=os.environ["METORIAL_API_KEY"])
genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])

deployment = metorial.provider_deployments.create(
name="Metorial Search",
Expand All @@ -374,11 +375,13 @@ session = await metorial.connect(
adapter=metorial_google(),
providers=[{"provider_deployment_id": deployment.id}],
)
model = genai.GenerativeModel("gemini-2.5-pro", tools=session.tools())
chat = model.start_chat()
chat = client.chats.create(
model="gemini-2.5-pro",
config=types.GenerateContentConfig(tools=session.tools()),
)
response = chat.send_message("Search the web for the latest news about AI agents.")

for part in response.parts:
for part in response.candidates[0].content.parts:
if fn := part.function_call:
result = await session.call_tool(fn.name, dict(fn.args))
# Continue conversation with result...
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
# Provider SDKs (all bundled)
"openai>=1.0.0",
"anthropic>=0.69.0",
"google-generativeai>=0.3.0",
"google-genai>=1.0.0",
"mistralai>=1.0.0",
# MCP
"mcp>=1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/metorial/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Metorial SDK version."""

__version__ = "2.3.2"
__version__ = "2.3.3"
Loading