Skip to content

feat(azure,vertex): add 26 missing models for full provider coverage#188

Merged
adaline-akshay merged 6 commits intomainfrom
claude-code-setup
Apr 3, 2026
Merged

feat(azure,vertex): add 26 missing models for full provider coverage#188
adaline-akshay merged 6 commits intomainfrom
claude-code-setup

Conversation

@adaline-ankit
Copy link
Copy Markdown
Contributor

Summary

  • Azure: Add 25 missing OpenAI models to achieve near-full parity with the OpenAI provider
    • GPT-4.1 series: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano
    • O-series: o1, o1-2024-12-17, o3, o3-2025-04-16, o3-mini, o3-mini-2025-01-31, o4-mini, o4-mini-2025-04-16
    • GPT-5 family: gpt-5, gpt-5.1, gpt-5.2, gpt-5.2-codex, gpt-5.2-chat-latest, gpt-5.3-codex, gpt-5-chat-latest, gpt-5-mini, gpt-5-nano, chatgpt-5.2
    • Remaining GPT-4 variants: gpt-4-turbo, gpt-4-turbo-preview, gpt-4-0125-preview, chatgpt-4o-latest
  • Vertex: Add gemini-3.1-pro-preview-customtools with pricing, achieving parity with the Google provider

Note: gpt-5.2-pro is excluded from Azure — it uses the OpenAI Responses API (/v1/responses) which requires a new Azure base class (current Azure base only supports /chat/completions).

Test plan

  • pnpm run build — 14/14 packages pass
  • pnpm run test — 17/17 suites pass (Azure: 100 tests, Vertex: 83 tests)
  • All new models follow existing Azure/Vertex patterns exactly
  • Changesets created for both @adaline/azure (minor) and @adaline/vertex (minor)
  • Verify Azure deployment-level auth works with o-series reasoning_effort param (requires live Azure endpoint)

🤖 Generated with Claude Code

adaline-ankit and others added 5 commits March 23, 2026 07:17
Add CLAUDE.md with project context, architecture patterns, and common
commands so Claude Code agents can work effectively in this repository.
Add .claude/settings.json with safe permission defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
P0: PostToolUse hook auto-runs Prettier on edited files
P0: PreToolUse hook blocks edits to .env, lock files, production configs
P0: Notification hook alerts when Claude needs input
P0: Expanded permissions for prettier, eslint, gh CLI
P1: GitHub Action enables @claude mentions in issues/PRs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skills (inspired by garrytan/gstack):
- /ship: full PR pipeline (build→test→lint→changeset→push→PR)
- /review: pre-landing code review (types, patterns, tests, imports)
- /investigate: root-cause debugging (gather→hypothesize→verify→fix→report)

Agents:
- code-reviewer: read-only review (sonnet), cannot modify files
- test-runner: fast test execution + failure analysis (haiku)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gstack (~/.claude/skills/gstack) provides battle-tested versions of
/ship, /review, /investigate plus 25 more skills. Keeping only
repo-specific skills: /add-model, /review-provider.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Azure: add 25 OpenAI models — GPT-4.1 series (3), o-series (8),
GPT-5 family (10), and remaining GPT-4 variants (4).
Vertex: add gemini-3.1-pro-preview-customtools for Google parity.

Constraint: gpt-5.2-pro excluded from Azure — requires Responses API base class
Rejected: Adding gpt-5.2-pro with chat/completions endpoint | incompatible API surface
Confidence: high
Scope-risk: narrow
Not-tested: Azure deployment-level auth with o-series reasoning_effort param

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 23, 2026

Greptile Summary

This PR achieves near-full provider coverage by adding 25 missing OpenAI models to the Azure provider and one gemini-3.1-pro-preview-customtools variant to Vertex. All new files follow the established patterns precisely — Azure models delegate to BaseChatModelOpenAI with the corresponding schema imported from @adaline/openai, and the Vertex model mirrors the existing gemini-3.1-pro-preview structure with its own pricing entry and provider registration.

Key observations:

  • GPT-4/GPT-5/ChatGPT variants (Azure): 17 new model files are structurally correct and will work with the current 2024-06-01 API version.
  • O-series models (Azure): 8 new files (o1, o1-2024-12-17, o3, o3-2025-04-16, o3-mini, o3-mini-2025-01-31, o4-mini, o4-mini-2025-04-16) are structurally consistent but will likely fail at runtime — Azure's o-series endpoints require a minimum API version of 2024-12-01-preview, while BaseChatModelOpenAI hardcodes 2024-06-01. This gap is flagged by the unchecked test item in the PR description and should be resolved before the o-series additions can be considered production-ready.
  • Vertex model: Correctly structured and fully registered in the provider factory; a minor specs-reference comment is missing compared to the sister gemini-3.1-pro-preview file.
  • GitHub Actions workflow: The new claude.yml has broad write permissions (contents, PRs, issues) with no actor restriction, allowing any commenter to trigger Claude Code Action — worth tightening before merge.

Confidence Score: 3/5

  • Safe to merge the GPT-4/GPT-5/Vertex changes; o-series Azure models and the GitHub Actions workflow each carry a functional/security concern that should be addressed first.
  • The bulk of the PR (non-o-series Azure models + Vertex model) is clean and ready. However, the 8 new o-series Azure models will produce runtime failures against Azure endpoints due to the hardcoded 2024-06-01 API version — a real functional blocker for those specific additions. Additionally, the new GitHub Actions workflow grants write permissions without restricting who can trigger it, which is a security concern. These two issues together prevent a 4/5.
  • core/providers/azure/src/models/chat-models/openai/base-chat-model.openai.azure.ts (API version) and .github/workflows/claude.yml (permission scope) need the most attention before merge.

Important Files Changed

Filename Overview
core/providers/azure/src/models/chat-models/openai/base-chat-model.openai.azure.ts Pre-existing hardcoded API version 2024-06-01 becomes a functional blocker for the newly added o-series models which require 2024-12-01-preview or newer on Azure.
core/providers/azure/src/models/chat-models/openai/index.ts Barrel file updated to export all 25 new Azure model files in alphabetical order; consistent with existing export pattern.
core/providers/azure/src/models/chat-models/openai/o4-mini.openai.azure.ts Representative of all 8 new o-series Azure model files; correctly delegates to BaseChatModelOpenAI with the corresponding OpenAI schema, but inherits the API version issue noted in the base class.
core/providers/vertex/src/models/chat-models/gemini-3.1-pro-preview-customtools.vertex.ts New Vertex model follows the established pattern exactly (same config as the regular gemini-3.1-pro-preview); missing specs reference comment is a minor style gap.
core/providers/vertex/src/models/pricing.json Pricing for gemini-3.1-pro-preview-customtools added with two token ranges and correct field structure matching all other entries.
core/providers/vertex/src/provider/provider.vertex.ts New gemini-3.1-pro-preview-customtools entry correctly registered in the provider factory alongside its literal, options, and schema exports.
.github/workflows/claude.yml New GitHub Actions workflow for Claude Code Action; grants contents: write and PR/issue write permissions without restricting which actors can trigger it, allowing any commenter to initiate write-access operations.
.claude/settings.json Adds prettier/eslint/gh-cli permissions and PostToolUse/PreToolUse hooks; protected-file guard and auto-format hooks look correct.
core/providers/azure/src/models/chat-models/openai/gpt-4-1.openai.azure.ts Representative of the 17 new non-o-series Azure model files; follows the existing pattern exactly with correct imports from @adaline/openai.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    User["User calls provider.chatModel(options)"]

    subgraph Azure ["Azure Provider"]
        AzureProv["Azure.chatModel()\n(always uses __base__)"]
        BaseChatModel["BaseChatModelOpenAI\napi-version: 2024-06-01 (hardcoded)"]
        AzureProv --> BaseChatModel
    end

    subgraph NewAzureModels ["New Model Schemas (exported, not registered)"]
        GPT41["GPT-4.1 / GPT-4.1-mini / GPT-4.1-nano\n✅ compatible with 2024-06-01"]
        GPT5["GPT-5 family (10 models)\n✅ compatible with 2024-06-01"]
        GPT4Turbo["GPT-4-turbo / GPT-4-0125-preview\n✅ compatible with 2024-06-01"]
        OSeries["o1, o3, o4-mini + dated variants (8 models)\n⚠️ requires ≥ 2024-12-01-preview"]
    end

    User --> AzureProv
    BaseChatModel -.->|"schema reference only\n(not wired into provider)"| GPT41
    BaseChatModel -.->|"schema reference only"| GPT5
    BaseChatModel -.->|"schema reference only"| GPT4Turbo
    BaseChatModel -.->|"schema reference only\n❌ API version mismatch"| OSeries

    subgraph Vertex ["Vertex Provider"]
        VertexProv["Vertex.chatModel(options)"]
        GeminiFactory["Model factory lookup by literal"]
        NewGemini["gemini-3.1-pro-preview-customtools\n✅ registered + priced"]
        VertexProv --> GeminiFactory --> NewGemini
    end

    User --> VertexProv
Loading

Comments Outside Diff (2)

  1. .github/workflows/claude.yml, line 141-144 (link)

    P1 No actor restriction on Claude trigger

    The workflow grants contents: write, pull-requests: write, and issues: write permissions and fires for any comment containing `@claude` — including comments from external contributors or bots on public repositories. Without an if: github.actor == '...' guard or a check that the comment author is a collaborator/member of the org, any user who can post a comment can trigger Claude Code Action with write access.

    Consider adding an actor check, e.g.:

    Or check github.event.comment.author_association against 'OWNER', 'MEMBER', or 'COLLABORATOR' to restrict trigger to trusted contributors.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: .github/workflows/claude.yml
    Line: 141-144
    
    Comment:
    **No actor restriction on Claude trigger**
    
    The workflow grants `contents: write`, `pull-requests: write`, and `issues: write` permissions and fires for any comment containing `` `@claude` `` — including comments from external contributors or bots on public repositories. Without an `if: github.actor == '...'` guard or a check that the comment author is a collaborator/member of the org, any user who can post a comment can trigger Claude Code Action with write access.
    
    Consider adding an actor check, e.g.:
    
    
    
    Or check `github.event.comment.author_association` against `'OWNER'`, `'MEMBER'`, or `'COLLABORATOR'` to restrict trigger to trusted contributors.
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. core/providers/azure/src/models/chat-models/openai/base-chat-model.openai.azure.ts, line 31 (link)

    P1 Hardcoded API version incompatible with o-series models

    The BaseChatModelOpenAI constructor hardcodes api-version=2024-06-01. All 8 new o-series models added in this PR (o1, o1-2024-12-17, o3, o3-2025-04-16, o3-mini, o3-mini-2025-01-31, o4-mini, o4-mini-2025-04-16) inherit from this class. Azure's o-series models require 2024-12-01-preview or newer to support the updated request schema and the reasoning_effort parameter — requests using the 2024-06-01 version will likely fail with a 400 or 404 from the Azure endpoint.

    This is a pre-existing base-class limitation, but it becomes a real functional blocker specifically for these new o-series additions (the unchecked test item in the PR description is a direct symptom of this gap).

    The cleanest fix would be to allow the API version to be injected into the constructor as an optional parameter (defaulting to "2024-06-01" for backward compatibility), then have each o-series model class pass "2025-01-01-preview" when calling super. That way existing GPT-4/GPT-4o models stay unaffected while the reasoning models use the correct version.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: core/providers/azure/src/models/chat-models/openai/base-chat-model.openai.azure.ts
    Line: 31
    
    Comment:
    **Hardcoded API version incompatible with o-series models**
    
    The `BaseChatModelOpenAI` constructor hardcodes `api-version=2024-06-01`. All 8 new o-series models added in this PR (`o1`, `o1-2024-12-17`, `o3`, `o3-2025-04-16`, `o3-mini`, `o3-mini-2025-01-31`, `o4-mini`, `o4-mini-2025-04-16`) inherit from this class. Azure's o-series models require **`2024-12-01-preview`** or newer to support the updated request schema and the `reasoning_effort` parameter — requests using the `2024-06-01` version will likely fail with a `400` or `404` from the Azure endpoint.
    
    This is a pre-existing base-class limitation, but it becomes a real functional blocker specifically for these new o-series additions (the unchecked test item in the PR description is a direct symptom of this gap).
    
    The cleanest fix would be to allow the API version to be injected into the constructor as an optional parameter (defaulting to `"2024-06-01"` for backward compatibility), then have each o-series model class pass `"2025-01-01-preview"` when calling `super`. That way existing GPT-4/GPT-4o models stay unaffected while the reasoning models use the correct version.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/claude.yml
Line: 141-144

Comment:
**No actor restriction on Claude trigger**

The workflow grants `contents: write`, `pull-requests: write`, and `issues: write` permissions and fires for any comment containing `` `@claude` `` — including comments from external contributors or bots on public repositories. Without an `if: github.actor == '...'` guard or a check that the comment author is a collaborator/member of the org, any user who can post a comment can trigger Claude Code Action with write access.

Consider adding an actor check, e.g.:

```suggestion
    if: |
      github.actor == 'adaline-ankit' || contains(fromJson('["owner", "member", "collaborator"]'), github.event.comment.author_association)
      && (
        (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
        (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
        (github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'claude'))
      )
```

Or check `github.event.comment.author_association` against `'OWNER'`, `'MEMBER'`, or `'COLLABORATOR'` to restrict trigger to trusted contributors.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: core/providers/vertex/src/models/chat-models/gemini-3.1-pro-preview-customtools.vertex.ts
Line: 14

Comment:
**Missing specs reference comment**

The sister file `gemini-3.1-pro-preview.vertex.ts` includes a `// Specs reference: https://cloud.google.com/vertex-ai/generative-ai/docs/models/model-versions (retrieved 2026-02-25)` comment above the literal constant for traceability. The new `customtools` variant omits this. Adding it (with the source and retrieval date for the pricing/capacity numbers) would keep the file consistent with the established pattern in this directory.

```suggestion
// Specs reference: https://cloud.google.com/vertex-ai/generative-ai/docs/models/model-versions (retrieved <date>)
const Gemini3_1ProPreviewCustomtoolsLiteral = "gemini-3.1-pro-preview-customtools" as const;
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: core/providers/azure/src/models/chat-models/openai/base-chat-model.openai.azure.ts
Line: 31

Comment:
**Hardcoded API version incompatible with o-series models**

The `BaseChatModelOpenAI` constructor hardcodes `api-version=2024-06-01`. All 8 new o-series models added in this PR (`o1`, `o1-2024-12-17`, `o3`, `o3-2025-04-16`, `o3-mini`, `o3-mini-2025-01-31`, `o4-mini`, `o4-mini-2025-04-16`) inherit from this class. Azure's o-series models require **`2024-12-01-preview`** or newer to support the updated request schema and the `reasoning_effort` parameter — requests using the `2024-06-01` version will likely fail with a `400` or `404` from the Azure endpoint.

This is a pre-existing base-class limitation, but it becomes a real functional blocker specifically for these new o-series additions (the unchecked test item in the PR description is a direct symptom of this gap).

The cleanest fix would be to allow the API version to be injected into the constructor as an optional parameter (defaulting to `"2024-06-01"` for backward compatibility), then have each o-series model class pass `"2025-01-01-preview"` when calling `super`. That way existing GPT-4/GPT-4o models stay unaffected while the reasoning models use the correct version.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(azure,vertex): add 26 missing model..." | Re-trigger Greptile


import pricingData from "../pricing.json";
import { BaseChatModelOptions, BaseChatModelVertex } from "./base-chat-model.vertex";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing specs reference comment

The sister file gemini-3.1-pro-preview.vertex.ts includes a // Specs reference: https://cloud.google.com/vertex-ai/generative-ai/docs/models/model-versions (retrieved 2026-02-25) comment above the literal constant for traceability. The new customtools variant omits this. Adding it (with the source and retrieval date for the pricing/capacity numbers) would keep the file consistent with the established pattern in this directory.

Suggested change
// Specs reference: https://cloud.google.com/vertex-ai/generative-ai/docs/models/model-versions (retrieved <date>)
const Gemini3_1ProPreviewCustomtoolsLiteral = "gemini-3.1-pro-preview-customtools" as const;
Prompt To Fix With AI
This is a comment left during a code review.
Path: core/providers/vertex/src/models/chat-models/gemini-3.1-pro-preview-customtools.vertex.ts
Line: 14

Comment:
**Missing specs reference comment**

The sister file `gemini-3.1-pro-preview.vertex.ts` includes a `// Specs reference: https://cloud.google.com/vertex-ai/generative-ai/docs/models/model-versions (retrieved 2026-02-25)` comment above the literal constant for traceability. The new `customtools` variant omits this. Adding it (with the source and retrieval date for the pricing/capacity numbers) would keep the file consistent with the established pattern in this directory.

```suggestion
// Specs reference: https://cloud.google.com/vertex-ai/generative-ai/docs/models/model-versions (retrieved <date>)
const Gemini3_1ProPreviewCustomtoolsLiteral = "gemini-3.1-pro-preview-customtools" as const;
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@adaline-akshay adaline-akshay merged commit 6db4812 into main Apr 3, 2026
@adaline-akshay adaline-akshay deleted the claude-code-setup branch April 3, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants