Skip to content

Add Maple AI as a built-in provider - #1

Open
Rob1Ham wants to merge 1 commit into
devfrom
feature/add-maple-ai-provider
Open

Add Maple AI as a built-in provider#1
Rob1Ham wants to merge 1 commit into
devfrom
feature/add-maple-ai-provider

Conversation

@Rob1Ham

Copy link
Copy Markdown
Owner

Summary

  • Adds Maple AI (TryMaple.ai) as a built-in provider for OpenCode, enabling privacy-focused AI inference through TEE-protected infrastructure
  • Includes 7 models: Llama 3.3 70B, DeepSeek R1, GPT-OSS 120B, Qwen3 Coder 480B, Qwen 2.5 72B, Mistral Small 3.1, and Gemma 3 27B

Details

Provider Implementation

  • Added maple custom loader in CUSTOM_LOADERS using @ai-sdk/openai-compatible package
  • Base URL points to local maple-proxy at http://localhost:8080/v1 (handles TEE attestation/encryption)
  • Authentication via MAPLE_API_KEY environment variable

Models Added

Model IDNameCapabilities
llama-3.3-70bLlama 3.3 70BGeneral reasoning
deepseek-r1-0528DeepSeek R1Reasoning enabled
gpt-oss-120bGPT-OSS 120BChatGPT-style
qwen3-coder-480bQwen3 Coder 480BCoding specialist
qwen2-5-72bQwen 2.5 72BMultilingual
mistral-small-3-1-24bMistral Small 3.1 24BImage support
gemma-3-27b-itGemma 3 27BImage support

Tests

Added 5 comprehensive tests covering:

  • Provider loading with MAPLE_API_KEY
  • Expected model availability
  • OpenAI-compatible package usage
  • Reasoning capability for DeepSeek model
  • Attachment capability for image-supporting models

All 63 tests pass (58 existing + 5 new).

Usage

  1. Install and run maple-proxy locally (handles TEE attestation)
  2. Set MAPLE_API_KEY environment variable
  3. Select any Maple AI model in OpenCode

References

Add Maple AI as a built-in provider for OpenCode. Maple AI provides
private, encrypted LLM access via Trusted Execution Environments (TEE).
Changes:
- Add maple custom loader in CUSTOM_LOADERS with localhost:8080 baseURL
- Add inline model definitions for 7 Maple AI models:
- llama-3.3-70b: General reasoning
- deepseek-r1-0528: Research/math/coding with reasoning
- gpt-oss-120b: ChatGPT-style creativity
- qwen3-coder-480b: Specialized coding
- qwen2-5-72b: Multilingual tasks
- mistral-small-3-1-24b: Visual insights (image support)
- gemma-3-27b-it: Image analysis (image support)
- Add comprehensive tests for Maple AI provider
Users need to:
1. Run maple-proxy locally (or use Maple desktop app)
2. Set MAPLE_API_KEY environment variable
Documentation: https://blog.trymaple.ai/maple-proxy-documentation/
@marksftw

Copy link
Copy Markdown

I created a new PR on top of the latest dev branch and submitted it upstream. Thanks for the inspiration. anomalyco#10436

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Rob1Ham@marksftw