feat(pi-continuous-learning): configure analyzer provider#100
Merged
MattDevy merged 3 commits intoMattDevy:mainfrom Apr 27, 2026
Merged
Conversation
…nd deduplicate AuthStorage Use isKnownProvider() guard (via getProviders()) to validate the configured provider before calling getModel, giving a clear error on unknown providers without needing unsafe casts. Remove redundant DEFAULT_CONFIG fallbacks since loadConfig always merges defaults. Create a single AuthStorage instance per run and thread it through analyzeProject/consolidateProject instead of constructing one per project.
…rors and add missing test
Throws 'Unknown analyzer provider: {id}' when the provider string is not
registered, instead of conflating it with the unknown-model message.
Adds a test covering the !isKnownProvider branch.
MattDevy
approved these changes
Apr 27, 2026
Owner
MattDevy
left a comment
There was a problem hiding this comment.
Thanks so much for this, @riffingonsoftware! The approach is clean and well thought-out.
A few things I particularly liked:
- The extraction of resolveAnalyzerModel into its own module with dedicated tests is a great call.
- The backwards-compatible default (Anthropic Haiku) means no existing users are affected.
- The error messages are specific and actionable.
I made a couple of small follow-up tweaks on top of your commits:
- Replaced the as-never cast with a proper isKnownProvider type guard (keeping it type-safe without the cast).
- Sharpened the error distinction between an unknown provider string vs. an unknown model ID for that provider.
Both were minor polish on an already solid implementation. Thanks again for the contribution! 🙌
Merged
MattDevy
added a commit
that referenced
this pull request
Apr 27, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>pi-continuous-learning: 0.14.0</summary> ## [0.14.0](pi-continuous-learning-v0.13.2...pi-continuous-learning-v0.14.0) (2026-04-27) ### Features * **pi-continuous-learning:** Configure analyzer provider ([#100](#100)) ([034d32b](034d32b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Summary
Allows configuration of the provider. The model was already configurable, but the provider was hard-coded to Anthropic, limiting options. This preserves the same behavior at defaults, but allows for it to be configured/overridden.
Checklist
npm run checkpasses locally (tests, lint, typecheck)feat:,fix:,docs:, etc.)