Files
letta-server/letta/test_gemini.py
Kevin Lin bd5b5fa9f3 feat(gemini): add 3.1 pro preview support (#9553)
Add 3.1 model metadata for Google AI and update Gemini tests/examples to use the new handle.

👾 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:55:11 -08:00

22 lines
453 B
Python

from letta_client import Letta
def create_agent() -> None:
client = Letta(base_url="http://localhost:8283")
agent_state = client.agents.create(
name="test-gemini-3-pro-agent",
model="google_ai/gemini-3.1-pro-preview",
embedding="openai/text-embedding-3-small",
context_window_limit=16000,
)
print("Created agent: ", agent_state)
def main():
create_agent()
if __name__ == "__main__":
main()