Skip to main content

A universal multi-model AI extension โ€” interact with OpenAI, Gemini, and Claude through a single interface.

Project description

๐Ÿš€ 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ide_model_ext-0.1.0.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ide_model_ext-0.1.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

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

Hashes for ide_model_ext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 057254ed6945b82b58ff67c1a102bfdedeb97af33c9528dbd9b76d720d1b99cc
MD5 2b6003affb586b1eebe3111278c64a74
BLAKE2b-256 f084ab1407cb1001d59d88323773e8107f515747438028361d944d0aa173b121

See more details on using hashes here.

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

Hashes for ide_model_ext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45da17978f53da3be244f5092a3a17d6aed8225708402eb15523f00914acdbdb
MD5 f1dfdc854e00effc05c9c411e153a687
BLAKE2b-256 0909fb7d5424ed47b360415e4aa5dbc7cc89754edd4f78aa6e50dd29df817617

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page