Abstract out generate validation and error handling into BaseProvider, eliminating duplicated logic across Anthropic, OpenRouter, and OpenAI providers.
Add token limit error detection and formatting across all provider modules to surface clear diagnostics when context windows are exceeded, improving error messages and preventing silent failures.
New Features
- Introduce `is_token_limit_error` checks in Anthropic, Gemini, Hugging Face, Ollama, OpenAI, and OpenRouter providers.
- Use `format_token_limit_error` to generate user‑friendly error messages for token limit overs.
Enhancements
- Centralize token limit error handling for consistent diagnostics across providers.
- Explicitly re‑raise `RuntimeError` in Hugging Face to preserve original behavior.
Bug Fixes
- None
Add a new provider that wraps the local Ollama server using an OpenAI‑compatible client, enabling generation via `ollama_host` configuration. This introduces the first provider for local LLM inference.
New Features
- Implement OllamaProvider with a `generate()` method, supporting custom host, model selection, and robust error handling.
Enhancements:
- Extend error message parsing to capture additional throttling indicators such as "RESOURCE_EXHAUSTED", "QUOTA_EXCEEDED", and "THROTTLED".
- Refactor the conditional logic for better readability and maintainability.
- Keep existing retry behavior while increasing resilience to API rate‑limit errors.
The update changes the default model, refactors imports, and implements robust retry logic with exponential back‑off and clearer error messages. This improves resilience and clarifies usage.
New Features
- Exponential back‑off retry on 429/quota exhausted responses.
- Configurable max_retries and retry_delay parameters.
Enhancements
- Default model set to gemini-2.5-flash.
- Improved error output with actionable troubleshooting steps.
The debug argument is used internally by devgen but is not accepted by the OpenAI API client. This change filters it out from kwargs before the API call to prevent TypeError.
Release v0.2.1 of DevGen CLI, a comprehensive toolkit automating common Git and project management tasks through AI. This initial packaging defines the project's metadata and a wide array of developer-centric features.
* **New Features**
* **AI-Powered Commit Messages:** Automatically generate semantic commit messages based on staged changes, adhering to Conventional Commits format.
* **Changelog Generation:** Create detailed changelogs from Git history, with categories for BREAKING CHANGES, Features, Bug Fixes, Documentation, and Other Changes.
* **Release Note Generation:** Produce structured release notes from Git history, ready for publication.
* **Gitignore File Generation:** Generate `.gitignore` files by selecting from GitHub's official templates, supporting interactive selection, multiple templates, and offline mode.
* **License File Generation:** Interactively generate various open-source license files (e.g., MIT, Apache-2.0, GPL-3.0), customizable with author name and year.
* **Multi-Provider AI Support:** Seamless integration with leading AI providers including Gemini, OpenAI, Anthropic, HuggingFace, and OpenRouter.
* **Enhancements & Refinements**
* **Unified CLI:** Provides a single command-line interface for all development automation tools.
* **Interactive Configuration:** Simple setup process for AI providers, models, and API keys via `devgen setup config`, stored persistently in `~/.devgen.yaml`.
* **Flexible Commit Workflow:** Offers options for dry runs, direct commits, automatic pushes, and force rebuilding of AI-generated commit messages.
* **Commit Caching:** Includes commands to list and clear cached commit messages for improved workflow.
* **Detailed Command Reference:** Comprehensive documentation for all `devgen` commands and their specific options.
* **Project Metadata:** Updated `PKG-INFO` with project summary, homepage, author details, license, keywords, classifiers, and Python requirements.
* **Dependency Management:** Specifies required Python packages including `anthropic`, `google-generativeai`, `openai`, `typer`, and `rich`.
* **Python 3.10+ Compatibility:** Ensures support for modern Python environments.