Skip to content

Conversation

@cschleiden
Copy link
Member

No description provided.

@cschleiden cschleiden marked this pull request as ready for review June 17, 2025 12:39
Copilot AI review requested due to automatic review settings June 17, 2025 12:39
@cschleiden cschleiden requested a review from a team as a code owner June 17, 2025 12:39
Copy link
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

This PR refactors model identifier handling by centralizing formatting/parsing logic, updating model validation to skip custom providers, and adding comprehensive tests.

  • Introduce ModelKey parsing and string formatting in internal/modelkey
  • Delegate Azure model identifier formatting to modelkey.FormatIdentifier
  • Enhance validateModelName to normalize IDs and skip validation for custom providers
  • Add tests for parsing, formatting, and validation behavior

Reviewed Changes

Copilot reviewed 8 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/modelkey/modelkey.go Added ModelKey, ParseModelKey, String, and FormatIdentifier utilities
internal/modelkey/modelkey_test.go New tests for ParseModelKey and ModelKey.String
internal/azuremodels/model_details.go Removed custom formatting, now uses modelkey.FormatIdentifier
cmd/run/run.go Updated validateModelName to use ParseModelKey, skip custom, normalize ID
cmd/run/run_test.go Added tests for validateModelName scenarios
Comments suppressed due to low confidence (1)

cmd/run/run_test.go:407

  • Add a test case for an empty modelName (""), since validateModelName returns an error when the input is blank, to ensure that edge-case is covered.
func TestValidateModelName(t *testing.T) {

Base automatically changed from garman/add-org-support to main June 18, 2025 08:48
@cschleiden cschleiden merged commit 8a3c805 into main Jun 18, 2025
5 checks passed
@cschleiden cschleiden deleted the cschleiden/custom-models branch June 18, 2025 09:31
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.

3 participants