Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>LLM ProviderNew to Visual Studio Code? Get it now.
LLM Provider

LLM Provider

anjanpoonacha

|
12 installs
| (0) | Free
VS Code extension that integrates SAP AI Core models with the Language Model API for enhanced AI-powered development.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LLM Provider - SAP AI Core Integration for VSCode

Version VSCode License

Integrate SAP AI Core models seamlessly with VSCode's Language Model API for enhanced AI-powered development.

🚀 Features

Core Capabilities

  • 🤖 AI Model Integration: Access SAP AI Core foundation models directly within VSCode
  • 💬 Chat Provider: Native integration with VSCode's chat interface
  • 🔄 Real-time Streaming: Support for streaming responses from AI models
  • 🔐 Secure Credential Management: Encrypted storage of SAP AI Core credentials
  • 📊 Token Estimation: Accurate token counting for cost management
  • 🎯 Multi-Scenario Support: Foundation models and orchestration scenarios

Advanced Features

  • ⚡ Version Compatibility: Automatic detection and adaptation to different VSCode API versions
  • 🔧 Diagnostic Tools: Built-in API compatibility checking and troubleshooting
  • 📝 Comprehensive Logging: Configurable logging levels for debugging and monitoring
  • 🔄 Model Cache Management: Efficient caching with manual refresh capabilities
  • 🎛️ Configuration Management: Flexible scenario switching and model selection

📦 Installation

From VSCode Marketplace

  1. Open VSCode
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "LLM Provider"
  4. Click Install

Manual Installation

  1. Download the latest .vsix file from Releases
  2. Open VSCode
  3. Run Extensions: Install from VSIX... from Command Palette
  4. Select the downloaded .vsix file

⚙️ Configuration

1. SAP AI Core Credentials Setup

The extension requires SAP AI Core credentials to function. Set up your credentials using the Command Palette:

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run SAP AI Core: Manage Credentials
  3. Select Set/Update Credentials
  4. Enter your credential JSON:
{
  "clientid": "your-client-id",
  "clientsecret": "your-client-secret",
  "url": "https://your-auth-url",
  "aiApiUrl": "https://your-ai-api-url",
  "resourceGroup": "your-resource-group"
}

2. Scenario Configuration

Configure the AI scenario in your VSCode settings:

{
  "sapAiCore.scenarioId": "foundation-models"
}

Available scenarios:

  • foundation-models - Direct access to foundation models (default)
  • orchestration - Advanced orchestration capabilities (future)

3. Logging Configuration

Control logging verbosity for debugging:

{
  "sapAiCore.logLevel": "info"
}

Log levels: debug | info | warn | error

🎯 Usage

Basic Chat Integration

  1. Open VSCode Chat: Use Ctrl+Alt+I / Cmd+Alt+I
  2. Select SAP AI Core: Choose from the model dropdown
  3. Start Chatting: Ask questions or request code assistance

Command Palette Actions

Command Description
SAP AI Core: Manage Credentials Set up or update your SAP AI Core credentials
SAP AI Core: Refresh Models Clear model cache and reload available models
SAP AI Core: Check API Compatibility View compatibility diagnostics
SAP AI Core: Test API Compatibility Run compatibility detection tests

Credential Management

  • View Status: Check which credentials are configured
  • Update Credentials: Modify existing credential configuration
  • Remove Credentials: Securely delete stored credentials
  • Legacy Cleanup: Remove old API key formats

🔧 Development

Prerequisites

  • Node.js 18+
  • VSCode 1.103.0+
  • TypeScript 5.8+

Setup

# Clone the repository
git clone https://github.com/anjanpoonacha/llmprovider.git
cd llmprovider

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Run tests
npm test

# Package extension
npm run package

Project Structure

src/
├── commands/           # VSCode commands
├── config/            # Configuration and constants
├── core/              # Core extension logic
├── providers/         # Language model providers
├── services/          # Business logic services
├── strategies/        # AI scenario strategies
├── types/             # TypeScript definitions
└── utils/             # Utility functions

Architecture Highlights

  • 🏗️ Modular Design: Clean separation of concerns with dependency injection
  • 🔄 Adapter Pattern: Support for multiple VSCode API versions
  • 🎯 Strategy Pattern: Flexible AI scenario handling
  • 📊 Universal Provider: Unified interface for different model types
  • 🔍 Compatibility System: Automatic API version detection and adaptation

🐛 Troubleshooting

Common Issues

Extension not loading models:

  1. Check credentials: SAP AI Core: Manage Credentials → View Credential Status
  2. Verify API compatibility: SAP AI Core: Check API Compatibility
  3. Refresh models: SAP AI Core: Refresh Models

Authentication errors:

  • Verify your SAP AI Core credentials are correct
  • Check network connectivity to SAP AI Core endpoints
  • Ensure resource group has proper permissions

Performance issues:

  • Adjust log level to warn or error in production
  • Clear model cache if experiencing stale data
  • Check VSCode version compatibility

Debug Mode

Enable detailed logging for troubleshooting:

{
  "sapAiCore.logLevel": "debug"
}

View logs in: Output → SAP AI Core Language Model Provider

📋 Requirements

System Requirements

  • VSCode: Version 1.103.0 or higher
  • Node.js: Version 18+ (for development)
  • Operating System: Windows, macOS, or Linux

SAP AI Core Requirements

  • Valid SAP AI Core subscription
  • Configured service instance with appropriate permissions
  • Network access to SAP AI Core endpoints

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Code Standards

  • Follow TypeScript strict mode guidelines
  • Use ESLint configuration provided
  • Write tests for new features
  • Update documentation as needed

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

  • Repository: GitHub
  • Issues: Bug Reports & Feature Requests
  • SAP AI Core: Official Documentation
  • VSCode API: Language Model API Documentation

📞 Support

  • GitHub Issues: For bug reports and feature requests
  • Documentation: Check the inline help and command descriptions
  • Logs: Enable debug logging for detailed troubleshooting information

Made with ❤️ for the SAP AI Core and VSCode communities

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft