Add modelsdev package spec and complete linters analyzer documentation coverage#43208
Merged
Merged
Conversation
4 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add README.md and documentation for modelsdev package
Add Jul 3, 2026
modelsdev package spec and complete linters analyzer documentation coverage
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores documentation/spec coverage by adding a package specification for pkg/modelsdev and updating pkg/linters/README.md so it reflects the set of analyzer subpackages currently present in the codebase.
Changes:
- Add a new spec README for
pkg/modelsdev, documentingFindPricing, caching behavior, dependencies, and normalization/conversion rules. - Expand
pkg/linters/README.mdto include missing analyzer entries across the overview, API table, usage example, and dependencies.
Show a summary per file
| File | Description |
|---|---|
| pkg/modelsdev/README.md | New package spec describing models.dev catalog loading, normalization, and the FindPricing API. |
| pkg/linters/README.md | Documentation updates to cover additional analyzer subpackages and align examples/dependencies with the current analyzers. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Low
Comment on lines
+15
to
+17
| | Function | Signature | Description | | ||
| |----------|-----------|-------------| | ||
| | `FindPricing` | `func(ctx context.Context, provider, model string) (map[string]float64, bool)` | Returns normalized per-token pricing for a provider/model pair. Falls back to cross-provider matching when provider lookup fails. Returns `(nil, false)` when no pricing is available | |
Comment on lines
+22
to
+24
| import "github.com/github/gh-aw/pkg/modelsdev" | ||
|
|
||
| pricing, ok := modelsdev.FindPricing(ctx, "github", "gpt-4.1") |
This was referenced Jul 3, 2026
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
The spec audit identified one package with no specification (
pkg/modelsdev) and gaps inpkg/linters/README.mdfor several analyzer subpackages. This PR closes those documentation gaps to restore package-spec coverage and align linter docs with the current codebase.modelsdevpackage specificationpkg/modelsdev/README.mdwith:FindPricing) signature and semanticslogger,syncutil)lintersREADME completenesspkg/linters/README.mdto include missing analyzer documentation in the relevant sections (overview/public API/dependencies/examples), including:deferinlooperrorfwrapvhttpnoctxhttprespbodyclosesprintfinttimesleepnocontext