A universal multi-model AI extension โ interact with OpenAI, Gemini, and Claude through a single interface.
Project description
๐ ide_model_ext
One extension. Three AI providers. Zero hassle.
ide_model_ext gives you a single, universal interface to interact with OpenAI, Google Gemini, and Anthropic Claude โ from Python scripts, the terminal CLI, or Jupyter notebooks. Stop juggling three SDKs and three different APIs.
โจ Features
- ๐ Unified API โ One
ModelClientfor GPT-4o, Gemini Pro, Claude Sonnet, and more. - ๐ Dynamic Model Selection โ Automatically picks the best available model based on your API keys.
- ๐ Transparent Routing โ Every response tells you which model and provider was used.
- ๐ Streaming Support โ Real-time streamed responses from all providers.
- ๐ Jupyter Magics โ
%aiand%%aimagic commands for in-notebook AI. - ๐ป CLI Tool โ Quick chat, interactive REPL, and model listing from your terminal.
- ๐ Extensible โ Add new providers by subclassing
BaseProvider.
๐ฆ Installation
pip install ide_model_ext
With Jupyter support:
pip install "ide_model_ext[jupyter]"
๐ Setup
Set your API keys as environment variables (only for the providers you want to use):
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="AIza..."
export ANTHROPIC_API_KEY="sk-ant-..."
โก Quick Start
Python
from ide_model_ext import ModelClient
# Auto-selects the best available model
client = ModelClient()
response = client.chat("Explain quantum computing in simple terms.")
print(response.content)
print(f"Answered by: {response.model} ({response.provider})")
# Or pick a specific model
client = ModelClient(model="gpt-4o")
response = client.chat("Write a haiku about Python.")
CLI
# One-shot query
ide-model-ext chat "What is machine learning?"
# Pick a model
ide-model-ext chat --model gemini-pro "Summarize this concept"
# Interactive REPL
ide-model-ext interactive
# List available models
ide-model-ext models
Jupyter Notebook
%load_ext ide_model_ext
%ai Tell me a joke about programming
%ai_model claude-3-5-sonnet-20241022
%%ai
Write a Python function that calculates
the Fibonacci sequence recursively.
๐ Documentation
- User Guide โ Full usage documentation.
- Publishing Guide โ How to publish on PyPI, GitHub, Dev.to.
- Contributing โ How to contribute or add new providers.
- Changelog
๐๏ธ Architecture
Your Code / CLI / Jupyter
โ
ModelClient โ simple user-facing API
โ
ModelRouter โ resolves model โ provider
โโโโผโโโ
OpenAI Gemini Claude โ provider adapters
โโโโผโโโ
BaseProvider โ abstract interface
๐ License
MIT License ยฉ 2026 Novatechnolab
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ide_model_ext-0.1.0.tar.gz.
File metadata
- Download URL: ide_model_ext-0.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
057254ed6945b82b58ff67c1a102bfdedeb97af33c9528dbd9b76d720d1b99cc
|
|
| MD5 |
2b6003affb586b1eebe3111278c64a74
|
|
| BLAKE2b-256 |
f084ab1407cb1001d59d88323773e8107f515747438028361d944d0aa173b121
|
File details
Details for the file ide_model_ext-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ide_model_ext-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45da17978f53da3be244f5092a3a17d6aed8225708402eb15523f00914acdbdb
|
|
| MD5 |
f1dfdc854e00effc05c9c411e153a687
|
|
| BLAKE2b-256 |
0909fb7d5424ed47b360415e4aa5dbc7cc89754edd4f78aa6e50dd29df817617
|