Commit Graph

140 Commits

Author SHA1 Message Date
Kayvan Sylvan
af47036bff chore: remove unused gemini_openai plugin and oauth_storage utility
## CHANGES

- Delete `gemini_openai` package and its OpenAI-compatible client wrapper
- Remove `OAuthToken` struct and expiry-check logic from `util`
- Remove `OAuthStorage` persistent token save/load/delete handlers
- Drop `HasValidToken` helper and atomic file-write token saving
- Delete all `oauth_storage` unit tests covering token lifecycle
2026-02-17 23:11:48 -08:00
Kayvan Sylvan
12f34621b9 chore: bump Go dependencies and remove deprecated Anthropic models
- Bump go-sqlite3 from v1.14.33 to v1.14.34
- Bump ollama from v0.15.6 to v0.16.1
- Bump google.golang.org/api from v0.265.0 to v0.266.0
- Bump google.golang.org/grpc from v1.78.0 to v1.79.0
- Remove deprecated Claude 3.x model references from Anthropic client
- Remove claude-3-7-sonnet model from OpenAI-compatible provider config
- Add changelog entry for PR #1996
- Add PDFURL and URLPDF to VSCode spell-check dictionary
- incoming 1996 changelog entry
2026-02-17 21:01:39 -08:00
Kayvan Sylvan
683c860b89 chore: bump anthropic-sdk-go from v1.22.0 to v1.23.0
- Upgrade Anthropic SDK Go dependency to version 1.23.0
- Add Claude Sonnet 4.6 to list of supported models
- Update `go.sum` checksums for new SDK version
2026-02-17 19:40:18 -08:00
Kayvan Sylvan
2244e2a152 feat: add optional API key authentication to LM Studio client
- Add optional API key setup question to client configuration
- Add `ApiKey` field to the LM Studio `Client` struct
- Create `addAuthorizationHeader` helper to attach Bearer token to requests
- Apply authorization header to all outgoing HTTP requests
- Skip authorization header when API key is empty or unset
2026-02-16 17:52:56 -08:00
Kayvan Sylvan
f26e328d40 feat: internationalize file manager, Vertex AI, and Copilot error messages via i18n
- Replace hardcoded error strings in `file_manager.go` with i18n translation keys
- Add file manager, Vertex AI, and Copilot i18n keys to all 10 locale files
- Internationalize Copilot plugin error messages and debug logs
- Internationalize Vertex AI model fetching error messages
- Fix JSON trailing comma syntax errors across all locale files
- Normalize German locale JSON indentation from tabs to spaces
- Use `AddSetupQuestionWithEnvName` for Bedrock AWS region setup
2026-02-16 13:10:00 -08:00
Kayvan Sylvan
3f46c45479 chore: gofmt fix 2026-02-16 08:42:39 -08:00
Kayvan Sylvan
c797a84847 feat: add error handling for fetch operations in i18n
- Add new error messages for fetch operations
- Rename `errInvalidLocationFormat` to `errInvalidLocationFormatKey`
- Use `errors.New` instead of `fmt.Errorf` for fetch errors
- Update Chinese locale with fetch-related error messages
2026-02-16 08:38:35 -08:00
Kayvan Sylvan
eeb9567ce0 feat: add i18n translations for VertexAI, Gemini, Bedrock, and fetch plugins
- Add VertexAI error message translations across 10 locale files
- Add Gemini TTS and audio error translations to all locales
- Add AWS Bedrock client error translations to all locales
- Add fetch plugin error message translations to all locales
- Replace hardcoded English strings with `i18n.T()` calls in Bedrock plugin
- Replace hardcoded English strings with `i18n.T()` calls in Gemini plugin
- Replace hardcoded English strings with `i18n.T()` calls in VertexAI plugin
- Replace hardcoded English strings with `i18n.T()` calls in fetch plugin
- Use `errors.New` instead of `fmt.Errorf` for non-formatted error strings
2026-02-16 08:28:54 -08:00
Kayvan Sylvan
a71a006f74 feat: add internationalization support for chatter and template file operations
- Replace hardcoded strings with i18n keys in chatter.go
- Add translation keys for errors, warnings, and metadata in locale files
- Update file.go to use i18n for operation messages and errors
- Provide translations in German, English, Spanish, Persian, French, Italian, Japanese, Portuguese, and Chinese
- Enable localized output for stream updates and file plugin operations
- Ensure consistent error handling across supported languages
- Maintain backward compatibility with existing functionality
2026-02-16 04:21:56 -08:00
Kayvan Sylvan
7839ae6fa7 MAESTRO: i18n: extract hard-coded strings from internal/plugins/template/extension_executor.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 00:45:46 -08:00
Kayvan Sylvan
398b07f13f MAESTRO: i18n: extract hard-coded strings from internal/plugins/ai/openai/openai.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 00:32:38 -08:00
Kayvan Sylvan
c8ca1792b4 MAESTRO: i18n: extract hard-coded strings from internal/plugins/template/extension_registry.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:52:59 -08:00
Kayvan Sylvan
7382ddaae5 MAESTRO: i18n: extract hard-coded strings from internal/plugins/ai/lmstudio/lmstudio.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:38:16 -08:00
Kayvan Sylvan
5fbddb2279 MAESTRO: i18n: extract hard-coded strings from internal/plugins/template/extension_manager.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:10:23 -08:00
Kayvan Sylvan
629257b1c1 feat: enable responses for GrokAI (xAI) provider
### CHANGES
- Set ImplementsResponses to true for GrokAI provider.
2026-02-12 18:32:54 -08:00
Kayvan Sylvan
9a593cbc5a Remove deprecated OpenAI models from image generation support list
- Remove gpt-4o, gpt-4o-mini, gpt-4.1, and gpt-4.1-mini from ImageGenerationSupportedModels
- These models are being retired by OpenAI effective February 13, 2026
- Keep gpt-4.1-nano, o3, gpt-5, gpt-5-nano, gpt-5.2 as supported
- Update tests to use gpt-5.2 instead of gpt-4o as the example supported model
- Update test expectations to reflect deprecated models no longer being supported

This ensures users get accurate warnings when attempting image generation with
retired models, while maintaining support for currently available models.

Co-Authored-By: Warp <agent@warp.dev>
2026-02-12 17:04:25 -08:00
Kayvan Sylvan
191edb56ca chore: remove deprecated GPT-4 models from image generation supported list
- Remove `gpt-4o` from image generation supported models
- Remove `gpt-4o-mini` from image generation supported models
- Remove `gpt-4.1` from image generation supported models
- Remove `gpt-4.1-mini` from image generation supported models
- Keep `gpt-4.1-nano`, `o3`, and `gpt-5` as supported models
2026-02-12 16:56:58 -08:00
Kayvan Sylvan
0894ec28c1 chore: update model references to latest versions across docs and code
- Update default summarize model to `claude-sonnet-4-5`
- Replace `gpt-4o` references with `gpt-5.2` throughout docs
- Replace `gpt-4o-mini` references with `gpt-5-mini`
- Add MiniMax-M2.5 and M2.5-lightning to static models list
- Update image generation warning to suggest `gpt-5.2`
- Update OpenAI chat example script to use `gpt-5-mini`
- Update REST API docs and examples with current model names
2026-02-12 16:45:05 -08:00
Kayvan Sylvan
92b53c8876 feat: add dynamic Abacus RouteLLM model fetching and update static model lists
- Add `fetchAbacusModels()` to dynamically retrieve models from Abacus RouteLLM API
- Fall back to static model list when Abacus API fetch fails
- Add GPT-5 Codex variants (5, 5.1, 5.1-max, 5.2) to static models
- Add GPT-5.2 and GPT-5.2-chat-latest to static model list
- Add claude-opus-4-6 and gemini-3-flash-preview to static models
- Add kimi-k2.5, glm-4.7, and glm-5 to static model list
- Rename `qwen/qwen3-Max` to lowercase `qwen3-max`
- Handle `static:abacus` as special case in `ListModels` routing
2026-02-12 13:33:20 -08:00
Kayvan Sylvan
3dc83584b9 chore: bump anthropic SDK to v1.21.0 and clean up unused dependencies
See https://www.anthropic.com/news/claude-opus-4-6

## CHANGES

- Upgrade anthropic-sdk-go from v1.20.0 to v1.21.0
- Add `ClaudeOpus4_6` to supported Anthropic model list
- Remove unused indirect dependencies from go.mod and go.sum
- Clean up legacy protobuf and gRPC version references
- Remove stale tensor, math, and image processing libraries
- Drop unused table writer and console dependencies
- Prune obsolete cloud.google.com version pins
2026-02-05 10:54:22 -08:00
Baker Tamory
ed6d004790 style: remove trailing blank line in azure.go to fix gofmt check 2026-02-02 14:43:47 +11:00
Baker Tamory
ef1ee793e1 fix(azure): support GPT-5 and o-series reasoning models
- Update default API version from 2024-05-01-preview to 2025-04-01-preview
  (required for o-series and GPT-5 models)
- Remove NeedsRawMode override that always returned false, inheriting parent
  logic that correctly skips temperature/top_p for reasoning models
- Add /responses route to deployment middleware for future v1 API support

Tested against Azure OpenAI gpt-5.2-chat deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:09:16 +11:00
Kayvan Sylvan
0285e52c7b feat: update Anthropic SDK to v1.20.0 and reorganize model definitions**
## CHANGES

- Bump `anthropic-sdk-go` dependency from v1.19.0 to v1.20.0
- Add deprecation notice for pre-February 2026 legacy models
- Add new Claude Sonnet 4.0 and Opus 4.0 model aliases
- Extend 1M context beta support to all Sonnet 4 variants
- Reorganize model list to separate deprecated from current models
- Add `neturl` to VS Code spell-check dictionary
2026-01-31 12:58:44 -08:00
Kayvan Sylvan
9f752f45af chore: remove OAuth support from Anthropic client
- Remove OAuth support from Anthropic client
- Delete `oauth.go` and related test files
- Simplify `IsConfigured` to check only API key
- Update configuration handling to remove OAuth references
- Clean up imports and unused variables in `anthropic.go`
- Adjust `GetConfig` and `UpdateConfig` methods in server configuration
- Remove OAuth-related environment variables from configuration
2026-01-29 19:49:50 -08:00
Kayvan Sylvan
bd38f5ae20 Merge pull request #1965 from infinitelyloopy-bt/fix/azure-openai-deployment-url
fix(azure): Fix deployment URL path for Azure OpenAI API
2026-01-24 12:00:09 -08:00
Baker Tamory
a61007b3b1 Apply PR review feedback from @ksylvan
- Add changelog file for PR #1965
- Fix trailing space formatting in deploymentRoutes map

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 01:39:18 +11:00
Kayvan Sylvan
8469665cab chore: add MiniMax provider support and update API endpoints
## CHANGES

- add MiniMax provider configuration with API endpoint updates
- implement NeedsRawMode method for MiniMax model handling
- define static MiniMax model list with M2 variants
- add Infermatic and Novita to VS Code extensions
- update test to use proper context.TODO() parameter
- configure MiniMax models as static discovery
- set ModelsURL to static:minimax for model listing
2026-01-23 22:45:54 -08:00
Baker Tamory
82974a6a2a fix(azure): Fix deployment URL path for Azure OpenAI API
The OpenAI Go SDK's azure.WithEndpoint() middleware has a bug where it
expects request paths like /openai/chat/completions but the SDK actually
sends paths like /chat/completions (without the /openai/ prefix since
that's included in the base URL). This causes the SDK's route matching
to fail, resulting in deployment names not being injected into the URL.

Azure OpenAI requires URLs like:
  /openai/deployments/{deployment-name}/chat/completions
But the SDK was generating:
  /openai/chat/completions

This fix:
1. Adds custom middleware that correctly transforms API paths to include
   the deployment name extracted from the request body's model field
2. Moves StreamOptions to only be set for streaming requests (Azure
   rejects stream_options for non-streaming requests)

Fixes #1954

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 13:31:04 +11:00
Kayvan Sylvan
f18d6cc574 feat: add Novita AI as a new OpenAI-compatible provider
- Add Novita AI provider configuration with API endpoint
- Update README to include Novita AI in supported providers list
- Configure Novita AI to use OpenAI-compatible interface
2026-01-22 21:33:20 -08:00
Kayvan Sylvan
816e1bab89 chore: add documentation and improve code style per review feedback
- Add documentation comments for messageTextFromParts, contentBlocksFromMessage,
  prependSystemContentToBlocks, contentBlockFromAttachmentURL, and parseDataURL
- Consolidate two switch statements in normalizeImageMimeType into single
  idiomatic Go switch with direct returns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:52:29 -08:00
Kayvan Sylvan
8c38cef1f1 chore: address Copilot review feedback for attachments handling
- Add debug logging for failed data URL parsing
- Add debug logging for unsupported MIME types
- Add debug logging for non-base64 data URLs
- Add documentation for normalizeImageMimeType with API reference
- Add documentation for isPDFURL explaining extension-only limitation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:12:23 -08:00
Kayvan Sylvan
bcce1bef99 fix for \\n -> \n 2026-01-21 14:56:16 -08:00
Kayvan Sylvan
eea80f3bee feat: add multi-content support for images and PDFs in Anthropic client
### CHANGES
- Update toMessages to handle multi-content messages with text and attachments
- Add contentBlocksFromMessage to convert message parts to Anthropic blocks
- Implement support for image URLs including data URLs and base64 images
- Add PDF attachment handling via data URLs and URL-based PDFs
- Introduce parseDataURL for extracting MIME type and data from data URLs
- Create normalizeImageMimeType to standardize supported image MIME types
- Add isPDFURL to detect PDF files from URL paths
- Refactor system content accumulation to use text extraction from parts
- Update tests to verify PDF attachment processing in multi-content messages
2026-01-21 14:19:40 -08:00
Kayvan Sylvan
a23c698947 feat: add image generation compatibility warnings for unsupported models
## CHANGES

- Add warning to stderr when using incompatible models with image generation
- Add GPT-5, GPT-5-nano, and GPT-5.2 to supported image generation models
- Create `checkImageGenerationCompatibility` function in OpenAI plugin
- Add comprehensive tests for image generation compatibility warnings
- Add integration test scenarios for CLI image generation workflows
- Suggest gpt-4o as alternative in incompatibility warning messages
2026-01-20 11:55:18 -08:00
Kayvan Sylvan
387610bcf8 Add Infermatic provider test case
Adds test coverage for the Infermatic AI provider in
TestCreateClient to verify the provider exists and
creates a valid client.

Part of #1033: Add Infermatic AI provider support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:38:38 -08:00
Kayvan Sylvan
9e1ee4d48e WIP: Phase 1 - Add Infermatic provider to ProviderMap
Issue: #1033
Phase: 1 of 2
Status: Pending verification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:25:31 -08:00
Kayvan Sylvan
a2370a0e3b chore: Note in the guide about restricted env + modernize fixes 2026-01-15 15:16:40 -08:00
Kayvan Sylvan
f50a7568d1 Merge branch 'main' into kayvan/msft_copilot_vendor_by_claude_opus_4_5 2026-01-15 15:00:42 -08:00
Tom Stetson
d98ad5290c fix: update Copilot SendStream to use domain.StreamUpdate
Update the SendStream interface to match the current Vendor interface
which now uses chan domain.StreamUpdate instead of chan string.

Changes:
- Update SendStream signature to use chan domain.StreamUpdate
- Update sendChatMessageStream signature accordingly
- Update parseSSEStream signature accordingly
- Wrap all channel sends with domain.StreamUpdate{Type: StreamTypeContent}

This fixes the build error introduced when the streaming interface was
updated to support metadata like token usage alongside content.
2026-01-15 14:50:59 -05:00
Kayvan Sylvan
c26a56a368 feat: add DigitalOcean Gradient AI Agents as a new vendor
## CHANGES

- Add DigitalOcean as a new AI provider in plugin registry
- Implement DigitalOcean client with OpenAI-compatible inference endpoint
- Support model access key authentication for inference requests
- Add optional control plane token for model discovery
- Create DigitalOcean setup documentation with environment variables
- Update README to list DigitalOcean in supported providers
- Handle model listing via control plane API with fallback
2026-01-13 22:52:13 -08:00
Kayvan Sylvan
a2058ae26e Merge branch 'main' into kayvan/msft_copilot_vendor_by_claude_opus_4_5 2026-01-13 10:35:24 -08:00
Kayvan Sylvan
7e7ab9e5f2 feat: add Mammouth as new OpenAI-compatible AI provider
## CHANGES

- Add Mammouth provider configuration with API base URL
- Configure Mammouth to use standard OpenAI-compatible interface
- Disable Responses API implementation for Mammouth provider
- Add "Mammouth" to VSCode spell check dictionary
2026-01-12 09:27:28 -08:00
Kayvan Sylvan
cf55be784f refactor: add NewVendorPluginBase factory function to reduce duplication
Add centralized factory function for AI vendor plugin initialization:
- Add NewVendorPluginBase(name, configure) to internal/plugins/plugin.go
- Update 8 vendor files (anthropic, bedrock, gemini, lmstudio, ollama,
  openai, perplexity, vertexai) to use the factory function
- Add 3 test cases for the new factory function

This removes ~40 lines of duplicated boilerplate code and ensures
consistent plugin initialization across all vendors.

MAESTRO: Loop 00001 refactoring implementation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 20:12:58 -08:00
Henri Cook
8017f376b1 fix: use MaxTokens not ModelContextLength for output limit 2026-01-08 19:23:21 +00:00
Kayvan Sylvan
6f103b2db2 feat: refactor Gemini region logic into getGeminiRegion method
### CHANGES

- Extract `getGeminiRegion` method for region determination
- Use `getGeminiRegion` in `sendGemini` for location setting
- Apply `getGeminiRegion` in `sendStreamGemini` for consistency
2026-01-08 11:19:31 -08:00
Kayvan Sylvan
19aeebe6f5 refactor: extract fetchModelsPage in Vertex AI to improve pagination
- Extract model fetching logic into a dedicated helper function.
- Improve response body cleanup during Vertex AI pagination loops.
- Remove unused time import and timeout constant from models.
- Streamline listPublisherModels function by delegating API requests to helper.
2026-01-08 11:16:25 -08:00
Kayvan Sylvan
2d79d3b706 chore: format fixes 2026-01-08 10:56:56 -08:00
Henri Cook
2501cbf47e feat(vertexai): add dynamic model listing and multi-model support
- Dynamic model listing from Vertex AI Model Garden API
- Support for both Gemini (genai SDK) and Claude (Anthropic SDK) models
- Curated Gemini model list (no API available to list them)
- Web search support for Gemini models
- Thinking/extended thinking support for Gemini
- TopP parameter support for Claude models
- Model filtering (excludes imagen, embeddings, legacy models)
- Model sorting (Gemini > Claude > DeepSeek > Llama > Mistral > Others)
2026-01-08 17:24:19 +00:00
Kayvan Sylvan
cb2759a5a1 Merge branch 'main' into fix-1842-feature-request-parallelize-au-0101-2335 2026-01-03 17:05:14 -08:00
majiayu000
8a28ca7b1e feat: parallelize audio chunk transcription using goroutines
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-01 23:38:32 +08:00