Skip to main content

🚀 ide_model_ext

PyPI version License: MIT Python 3.9+

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 ModelClient for 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 — %ai and %%ai magic 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


🏗️ 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

Metadata

Release files for ide-model-ext 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ide-model-ext 0.1.0
File Size Uploaded Provenance Actions
ide_model_ext-0.1.0.tar.gz 23.3 kB Without provenance Details for ide_model_ext-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ide-model-ext 0.1.0
File Interpreter ABI Platform Actions
ide_model_ext-0.1.0-py3-none-any.whl Python 3 none any Details for ide_model_ext-0.1.0-py3-none-any.whl

Total release size: 44.2 kB

Release files / ide_model_ext-0.1.0.tar.gz

Download URL ide_model_ext-0.1.0.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
057254ed6945b82b58ff67c1a102bfdedeb97af33c9528dbd9b76d720d1b99cc
BLAKE2b-256 checksum
How to use checksums
f084ab1407cb1001d59d88323773e8107f515747438028361d944d0aa173b121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / ide_model_ext-0.1.0-py3-none-any.whl

Download URL ide_model_ext-0.1.0-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45da17978f53da3be244f5092a3a17d6aed8225708402eb15523f00914acdbdb
BLAKE2b-256 checksum
How to use checksums
0909fb7d5424ed47b360415e4aa5dbc7cc89754edd4f78aa6e50dd29df817617
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for ide-model-ext 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page