Skip to content

feat(cli): improve provider status accuracy and error handling - #18

Merged
murdore merged 1 commit into
releasefrom
fix/provider-status-accuracy
Jun 21, 2025
Merged

murdore merged 1 commit into
releasefrom
fix/provider-status-accuracy

Conversation

@murdore

@murdore murdore commented Jun 21, 2025

Copy link
Copy Markdown
Contributor

Description

This pull request fixes a critical bug where the CLI was incorrectly reporting provider status due to the SDK's automatic fallback mechanism. It also resolves a circular dependency issue that was causing a SyntaxError in the generate-text command.

Changes

  • Direct Provider Testing: The provider status command now tests each provider directly, bypassing the SDK's fallback to provide accurate authentication status.
  • Enhanced Ollama Check: The Ollama status check now verifies both service availability and the presence of the required model.
  • Improved Error Handling: The Ollama provider now throws a clear, actionable error message when a model is not found.
  • Circular Dependency Fix: Resolved a SyntaxError in the generate-text command by refactoring the tool registry to use a singleton pattern.
  • Documentation Updates: Updated all relevant documentation to reflect the new provider status checks and error handling.

Impact

  • The CLI now provides an accurate and helpful status for all AI providers.
  • The generate-text command will now work correctly in all environments.
  • Users will now receive clear, actionable error messages when a provider is not configured correctly or a model is not available.

This commit addresses a critical bug where the CLI was incorrectly reporting provider status due to the SDK's automatic fallback mechanism.

The key changes include:

- **Direct Provider Testing**: The `provider status` command now tests each provider directly, bypassing the SDK's fallback to provide accurate authentication status.
- **Enhanced Ollama Check**: The Ollama status check now verifies both service availability and the presence of the required model.
- **Improved Error Handling**: The Ollama provider now throws a clear, actionable error message when a model is not found.
- **Circular Dependency Fix**: Resolved a `SyntaxError` in the `generate-text` command by refactoring the tool registry to use a singleton pattern.
- **Documentation Updates**: Updated all relevant documentation to reflect the new provider status checks and error handling.
@murdore
murdore merged commit 523e845 into release Jun 21, 2025
@murdore
murdore deleted the fix/provider-status-accuracy branch June 21, 2025 10:32
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants