feat: add Azure OpenAI adapter, update README, and bundle Renovate dep updates#72
Merged
Merged
Conversation
…zure-openai-adapter-and-readme-cleanup
…' into feat/azure-openai-adapter-and-readme-cleanup
…ure-openai-adapter-and-readme-cleanup
…o feat/azure-openai-adapter-and-readme-cleanup
…ure-openai-adapter-and-readme-cleanup # Conflicts: # pyproject.toml # uv.lock
… into feat/azure-openai-adapter-and-readme-cleanup
…tifact-5.x' into feat/azure-openai-adapter-and-readme-cleanup
…' into feat/azure-openai-adapter-and-readme-cleanup
…at/azure-openai-adapter-and-readme-cleanup
|
Successfully published version 0.0.2.dev248 to TestPyPI. 🚀 |
|
Successfully published version 0.0.2.dev249 to TestPyPI. 🚀 |
There was a problem hiding this comment.
Pull request overview
This PR adds first-class Azure OpenAI support to PromptDrifter (adapter + CLI/Runner wiring + schema/config registration), refreshes the README formatting/status tables, and batches several Renovate dependency updates (Python deps, docs frontend deps, and GitHub Actions).
Changes:
- Introduce an
azure_openaiadapter (Azure REST shape) and register it across adapter registry, config model literals, and JSON schema. - Wire Azure OpenAI API key support through CLI/Runner and add unit tests for the adapter and CLI flag behavior.
- Update README formatting/status presentation and bump multiple dependencies / workflows (plus regenerate lockfiles).
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/promptdrifter/adapters/azure_openai.py |
New Azure OpenAI adapter + config (core functionality of the feature). |
src/promptdrifter/adapters/models/azure_openai_models.py |
Adds Azure-specific header model and reuses the standard response model. |
src/promptdrifter/adapter_manager.py |
Registers azure_openai in the adapter registry. |
src/promptdrifter/adapters/__init__.py |
Exposes AzureOpenAIAdapter from the adapters package. |
src/promptdrifter/cli.py |
Adds --azure-openai-api-key and passes it into Runner. |
src/promptdrifter/runner.py |
Stores Azure key in Runner’s api_keys map for adapter creation. |
src/promptdrifter/models/config.py |
Extends adapter_type literal to include azure_openai. |
src/promptdrifter/schema/v0.1/schema.json |
Adds azure_openai to the schema enum for adapter type validation. |
src/promptdrifter/config/adapter_settings.py |
Adds Azure OpenAI env var names + defaults (endpoint/api-version). |
tests/unit/adapters/test_azure_openai_adapter.py |
New unit tests for Azure adapter behavior and error handling. |
tests/unit/test_cli.py |
Updates CLI tests to include the new Azure API key argument + adds a flag test. |
tests/unit/test_adapter_manager.py |
Updates adapter registry expectations to include Azure. |
README.md |
Removes emoji from headings/anchors and marks Azure OpenAI as available (tables updated). |
pyproject.toml |
Bumps Python dependencies (OpenAI, Rich, importlib-resources, respx, pytest-asyncio). |
docs/package-lock.json |
Updates docs frontend deps (React / TS). |
.github/workflows/shared-build-and-test.yaml |
Bumps setup-uv action to v8.1.0. |
.github/workflows/shared-publish-package.yaml |
Bumps setup-uv action to v8.1.0. |
.github/workflows/deploy-docs.yaml |
Bumps upload-pages-artifact action to v5. |
Files not reviewed (1)
- docs/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Successfully published version 0.0.2.dev250 to TestPyPI. 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three things in this branch:
1. Azure OpenAI adapter
azure_openaiadapter wired to the Azure REST shape:api-keyheader,POST /openai/deployments/{deployment}/chat/completions?api-version=...(deployment = the configuredmodel, configurableapi_version, default2024-10-21).adapter_manager,adapters/__init__, themodels/config.pyLiteral, andschema/v0.1/schema.jsonenum.--azure-openai-api-keyflag,AZURE_OPENAI_API_KEYenv var, plusAZURE_OPENAI_ENDPOINT/AZURE_OPENAI_API_VERSIONenv support.2. README cleanup
<details>summaries, and the badge/CTA lines.<details>summaries.3. Bundled Renovate dependency updates
Merged 9 open Renovate branches via 3-way merge (preserving their commits):
openai 2.38,importlib-resources 7.1,respx 0.23.1,pytest-asyncio 1.4,rich 15,setup-uv v8,upload-pages-artifact v5,react-monorepo 19.2.6,typescript 6.0.3. Regenerateduv.lock.Code review
A high-effort multi-angle review was run. Key fix applied: Azure OpenAI was wired through the CLI/Runner for parity with other providers (previously env-var-only). Unused response model classes were trimmed.
A noted follow-up (out of scope): OpenAI and Azure adapters share a near-identical
execute(); a sharedOpenAICompatibleAdapterbase class could de-duplicate them.Verification
ruff check .cleanNote
The bundled Renovate PRs (#58, #59, #62, #63, #65, #66, #67, #68, #71) will need closing once this lands.