Skip to content

[dead-code] chore: remove obsolete modelsdev catalog pricing API - #48739

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/dead-code-remove-functions
Closed

[dead-code] chore: remove obsolete modelsdev catalog pricing API#48739
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/dead-code-remove-functions

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This change removes dead pkg/modelsdev pricing-catalog code and the tests/specs that only exercised that API surface. It keeps the normalization helpers still used by CLI cost logic and updates package-local docs to match the reduced public surface.

  • API surface reduction (pkg/modelsdev)

    • Removed unused pricing-catalog functions from catalog.go:
      • FindPricing
      • ensureCatalog
      • downloadAndParseCatalog
      • parseCatalog
      • parseCostMap
    • NormalizeProvider and NormalizeComparableModelID remain as the package’s active public API.
  • Test/spec cleanup

    • Deleted pkg/modelsdev/catalog_test.go (tests tied to removed catalog/pricing internals).
    • Removed TestSpec_PublicAPI_FindPricing and TestSpec_DesignDecision_ProviderAliases from pkg/modelsdev/spec_test.go.
    • Kept normalization-focused spec coverage.
  • Documentation alignment

    • Updated pkg/modelsdev/README.md to remove pricing lookup references/examples and describe the normalization-only API.
provider := modelsdev.NormalizeProvider(" github_models ")
modelID := modelsdev.NormalizeComparableModelID(" GPT_4.1-mini ")
// provider == "github-copilot"
// modelID == "gpt-4-1-mini"

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove dead functions from catalog model [dead-code] chore: remove obsolete modelsdev catalog pricing API Jul 28, 2026
Copilot AI requested a review from pelikhan July 28, 2026 21:50
@pelikhan
pelikhan marked this pull request as ready for review July 28, 2026 21:51
Copilot AI review requested due to automatic review settings July 28, 2026 21:51

Copilot AI left a comment

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.

Pull request overview

Removes the obsolete models.dev pricing API while retaining normalization helpers used by CLI cost logic.

Changes:

  • Removed pricing catalog implementation and tests.
  • Retained normalization APIs and coverage.
  • Updated package documentation for the reduced API.
Show a summary per file
File Description
pkg/modelsdev/catalog.go Removes catalog pricing logic.
pkg/modelsdev/catalog_test.go Deletes obsolete pricing tests.
pkg/modelsdev/spec_test.go Removes pricing API specifications.
pkg/modelsdev/README.md Documents normalization-only behavior.

Review details

Tip

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

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread pkg/modelsdev/README.md
@pelikhan pelikhan closed this Jul 28, 2026
@github-actions
github-actions Bot deleted the copilot/dead-code-remove-functions branch August 6, 2026 02:59
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.

[dead-code] chore: remove dead functions — 5 functions removed

3 participants