Skip to content

feat: add gpt-4.1 builtin model alias#30003

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-model-alias-inventory
May 3, 2026
Merged

feat: add gpt-4.1 builtin model alias#30003
pelikhan merged 2 commits intomainfrom
copilot/update-model-alias-inventory

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 3, 2026

The GPT-4.1 model family (gpt-4.1, gpt-4.1-mini, gpt-4.1-nano and their dated variants) is live on OpenAI but had no builtin alias. The reasoning-model alias proposed in the inventory issue is deferred per reviewer request.

Changes

  • pkg/workflow/model_aliases.go — New "gpt-4.1" entry in BuiltinModelAliases() with copilot/gpt-4.1* / openai/gpt-4.1* patterns; doc comment updated
  • pkg/workflow/model_aliases_test.gogpt-4.1 added to expectedFamilies and vendorFamilies coverage checks
  • docs/.../model-alias-specification.md — New row in the §9.1 vendor family alias table
models:
  gpt-4.1:
    - "copilot/gpt-4.1*"
    - "openai/gpt-4.1*"

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/79109956-73d6-4e40-8ff3-9240ab225f6d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update model alias inventory for 2026-05-03 feat: add gpt-4.1 builtin model alias May 3, 2026
Copilot AI requested a review from pelikhan May 3, 2026 20:26
// - "large" → sonnet, gpt-5, gemini-pro
// - "auto" → large (convenience alias for the default capable tier)
func BuiltinModelAliases() map[string][]string {
return map[string][]string{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot move models information to self contained JSON file embedded in go compiler.

@pelikhan pelikhan marked this pull request as ready for review May 3, 2026 20:30
Copilot AI review requested due to automatic review settings May 3, 2026 20:30
@pelikhan pelikhan merged commit e760767 into main May 3, 2026
51 of 61 checks passed
@pelikhan pelikhan deleted the copilot/update-model-alias-inventory branch May 3, 2026 20:30
Copilot stopped work on behalf of pelikhan due to an error May 3, 2026 20:30
Copilot AI requested a review from pelikhan May 3, 2026 20:30
@github-actions github-actions Bot mentioned this pull request May 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

🧪 Test Quality Sentinel Report

Test Quality Score: 100/100

Excellent test quality

Metric Value
New/modified tests analyzed 1
✅ Design tests (behavioral contracts) 1 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 1 (100%)
Duplicate test clusters 0
Test inflation detected No
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
TestBuiltinModelAliases pkg/workflow/model_aliases_test.go ✅ Design None

Analysis

The PR adds gpt-4.1 to the builtin model alias map in model_aliases.go (+5 lines) and extends TestBuiltinModelAliases to verify the new alias is present and carries a copilot/* pattern (+2 lines). The test file already had a mandatory //go:build !integration build tag, uses no mock libraries, and all assertions include descriptive messages.

Test inflation ratio: 0.4:1 (2 test lines added vs 5 production lines added) — well within the 2:1 threshold.

Edge case coverage: TestBuiltinModelAliases also verifies the fresh-copy invariant (mutating the returned map does not pollute a subsequent call), which qualifies as an edge case scenario.


Verdict

Check passed. 0% of modified tests are implementation tests (threshold: 30%).


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 1 modified test — unit (//go:build !integration)

References: §25290024934

🧪 Test quality analysis by Test Quality Sentinel · ● 509.7K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 100/100. Test quality is excellent — 0% of modified tests are implementation tests (threshold: 30%).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new builtin gpt-4.1 model alias so workflows can reference the GPT-4.1 family through the shared alias map and documented specification.

Changes:

  • Added a new gpt-4.1 builtin alias with Copilot/OpenAI wildcard patterns in the workflow model alias map.
  • Extended the builtin-alias test lists to include gpt-4.1.
  • Updated the model alias specification table to document the new vendor-family alias.
Show a summary per file
File Description
pkg/workflow/model_aliases.go Introduces the new builtin gpt-4.1 alias entry and updates the function doc comment.
pkg/workflow/model_aliases_test.go Expands alias presence/coverage checks to include gpt-4.1.
docs/src/content/docs/reference/model-alias-specification.md Documents gpt-4.1 in the builtin vendor-family alias table.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 3

Comment on lines +65 to +67
"gpt-4.1": {
"copilot/gpt-4.1*",
"openai/gpt-4.1*",
| `sonnet` | `copilot/*sonnet*`, `anthropic/*sonnet*` |
| `haiku` | `copilot/*haiku*`, `anthropic/*haiku*` |
| `opus` | `copilot/*opus*`, `anthropic/*opus*` |
| `gpt-4.1` | `copilot/gpt-4.1*`, `openai/gpt-4.1*` |
Comment on lines +65 to +67
"gpt-4.1": {
"copilot/gpt-4.1*",
"openai/gpt-4.1*",
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.

[model-inventory] Model alias inventory update - 2026-05-03

3 participants