Skip to content

Assistant: reorg/refactor provider handling #10532

@sharon-wang

Description

@sharon-wang

We've collected various ideas around cleanup in the provider code, to reduce complexity, improve code quality, and facilitate a better dev experience when working on provider-related code.

  • Separate provider classes in models.ts into separate files
  • Use more accurate language, e.g. LanguageModel --> ModelProvider
  • Make AILanguageModel abstract class more robust
    • make providerName abstract so it must be specified by subclasses
    • try to reuse more code / reduce repeated boilerplate in provider classes
    • can we make it so that the ai client does not necessarily have to be the vercel ai sdk? Some providers may use custom SDKs or the OpenAI SDK
  • Consistent logging across all providers, ensure debug/trace/info/warn/error are used appropriately to provide enough logging at the INFO level, which is the default log level
  • Add integration tests for each supported provider
  • Improve commenting in Assistant extension in general, i.e. JSDoc for functions
  • Can we move model filtering utils to Core and expose to extensions via API
  • Ensure we error/bail appropriately when models can't be retrieved dynamically and we don't have a default/static list that can be used

Metadata

Metadata

Labels

area: assistantIssues related to Positron Assistant

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions