Commit Graph

100 Commits

Author SHA1 Message Date
Matt Rubens
4027e1c10c Add non-streaming completePrompt to all providers 2025-01-13 17:20:06 -05:00
Matt Rubens
f7759c1be5 Merge pull request #295 from RooVetGit/add_coverage
Add test coverage
2025-01-09 12:34:05 -05:00
Matt Rubens
5fbfe9b775 Add test coverage 2025-01-07 16:20:11 -05:00
Matt Rubens
0aa5f1fb85 Add the o1 model 2025-01-07 13:33:47 -05:00
Matt Rubens
7383a0514a Merge pull request #282 from RooVetGit/open_ai_streaming_toggle
Streaming checkbox for OpenAI-compatible providers
2025-01-05 22:46:50 -05:00
Matt Rubens
5e8d804d2b Add test 2025-01-05 20:52:06 -05:00
Matt Rubens
2cdfff02c0 Streaming checkbox for OpenAI-compatible providers 2025-01-05 20:34:54 -05:00
Frank
ac776cc8bf fix: adjust log wording 2025-01-05 19:25:52 -05:00
Frank
f813d65b5a fix: parse text to float 2025-01-05 19:25:44 -05:00
Frank
e632998026 feat: add cache information 2025-01-05 19:25:29 -05:00
Frank
8284efc64b fix: use x-completion-request-id header 2025-01-05 16:42:34 -05:00
Frank
6b048923c6 fix: remove unnecessary delay 2025-01-05 16:42:20 -05:00
Frank
e5e700ffcb feat: add Glama gateway 2025-01-04 22:50:12 -05:00
Matt Rubens
6290f90fa5 Refactor 2024-12-29 12:20:35 -08:00
Matt Rubens
25987dd40b Remove truncation logic for now 2024-12-29 12:03:28 -08:00
Matt Rubens
eb8c4cc50f Add DeepSeek to the list of providers 2024-12-29 11:27:31 -08:00
Matt Rubens
fb70552b57 Interface cleanup 2024-12-28 21:50:27 -08:00
Matt Rubens
111abdbb2c Enhance prompt button for openrouter 2024-12-28 15:44:14 -08:00
Premshay
8460a796e9 Merge branch 'main' into main 2024-12-15 11:15:43 +02:00
Matt Rubens
2cfd76c305 Add 'Include stream options' checkbox for OpenAI-compatible providers 2024-12-12 09:20:58 -05:00
Matt Rubens
156cab8cbc Fix: Add checkbox for stream_options in OpenAI-compatible providers 2024-12-12 08:58:38 -05:00
Cline
1069fda643 Add comprehensive test cases for AwsBedrockHandler 2024-12-11 22:49:02 +02:00
Cline
ca41c54cb5 test(bedrock): add comprehensive test coverage for Bedrock integration
- Add tests for AWS Bedrock handler (stream handling, config, errors)
- Add tests for message format conversion (text, images, tools)
- Add tests for stream event parsing and transformation
- Add tests for cross-region inference and prompt cache
- Add tests for metadata and message lifecycle events
2024-12-11 22:48:49 +02:00
Cline
51a57d5bbf fix(bedrock): improve stream handling and type safety
- Fix TypeScript error in ConverseStreamCommand payload
- Add proper JSON parsing for test stream events
- Improve error handling with proper Error objects
- Add test-specific model info with required fields
- Fix cross-region inference and prompt cache config
2024-12-11 22:47:59 +02:00
Cline
140318cecd feat(api): unify Bedrock provider using Runtime API
Problem:
The current Bedrock implementation uses the Bedrock SDK, which requires separate handling for different model types and doesn't provide a unified streaming interface.

Solution:
Integrate the Bedrock Runtime API to provide a single, unified interface for all Bedrock models (Claude and Nova) using the ConverseStream API. This eliminates the need for separate handlers while maintaining all existing functionality.

Key Changes:
- Refactored AwsBedrockHandler to use @aws-sdk/client-bedrock-runtime
- Enhanced bedrock-converse-format.ts to handle all content types and properly transform between Anthropic and Bedrock formats
- Maintained cross-region inference support with proper region prefixing
- Added support for prompt caching configuration
- Improved AWS credentials handling to better support default providers
- Added proper error handling and token tracking for all response types

Dependencies:
- Added @aws-sdk/client-bedrock-runtime for unified API access
- Removed @anthropic-ai/bedrock-sdk dependency

Testing:
- Verified message format conversion for all content types
- Tested cross-region inference functionality
- Validated streaming responses for both Claude and Nova models

This change simplifies the codebase by providing a single, consistent interface for all Bedrock models while maintaining full compatibility with existing features.
2024-12-11 22:47:56 +02:00
lloydchang
9abe3f6916 fix(openai.ts): default to an empty string if undefined
Change:

const urlHost = new URL(this.options.openAiBaseUrl).host;

To:

const urlHost = new URL(this.options.openAiBaseUrl ?? "").host;

because the nullish coalescing operator (??) to default to an empty string if this.options.openAiBaseUrl is undefined.

It ensures that the URL constructor always receives a valid string.
2024-12-11 02:37:26 -08:00
lloydchang
7c870733a1 Fix code scanning alert no. 1: Incomplete URL substring sanitization
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-12-11 02:18:04 -08:00
Matt Rubens
da31a23499 Create a structure for different diff strategies, starting with unified (#55) 2024-12-09 11:04:40 -05:00
John Stearns
423e2af520 Continuing work on support for OpenRouter compression (#43) 2024-12-07 09:38:13 -08:00
Mark Percival
93e70c62f1 Chore: Prettier for consistant formatting (#794)
* Chore: Pretier for consistant formatting

- TODO: This PR needs to be updated by Saoud after he runs `npm install` & `npm format:fix` and commits the results of the prettier changes.

* Revert prettier config

* Run npm install

* Fix prettier config and ignore package lock

* Run format

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2024-11-21 13:13:54 -08:00
Saoud Rizwan
39bc35eec1 Add LM Studio provider 2024-11-12 22:02:42 -05:00
Saoud Rizwan
bac0b1a0cb Add prompt caching for new model ids on openrouter 2024-11-12 18:35:51 -05:00
Saoud Rizwan
ad29ff2a03 Add AWS cross-region inference toggle 2024-11-07 13:51:13 -05:00
Saoud Rizwan
48cdfa9874 Add Haiku 3.5 to Anthropic, Bedrock, Vertex 2024-11-04 14:08:25 -05:00
Saoud Rizwan
62688c261a Prepare for release 2024-10-22 16:22:37 -04:00
Saoud Rizwan
165272ab47 Update Anthropic model IDs 2024-10-22 16:21:17 -04:00
Saoud Rizwan
9052528d2b Fix o1 in openai native 2024-10-18 07:56:15 -04:00
Saoud Rizwan
90b0c8243c Fixes 2024-10-16 18:00:53 -04:00
Saoud Rizwan
dff81b9d09 Fix o1 on openai native 2024-10-16 09:59:30 -04:00
Saoud Rizwan
bf05131b81 Update openrouter referer 2024-10-09 03:43:30 -04:00
Saoud Rizwan
554c4004d3 Fixes 2024-10-09 01:50:00 -04:00
Saoud Rizwan
a4de927696 Fix openrouter generation failure 2024-10-09 01:50:00 -04:00
Saoud Rizwan
ccb4738d7e Use or instead of null coalescing instead since state may return non undefined for new values 2024-10-09 01:50:00 -04:00
Saoud Rizwan
729e32514e Use openrouter generation endpoint for usage reporting 2024-10-09 01:50:00 -04:00
Saoud Rizwan
da505170d4 Fixes 2024-10-09 01:50:00 -04:00
Saoud Rizwan
8f4a65bc79 Fixes 2024-10-09 01:49:59 -04:00
Saoud Rizwan
f6a14fdfb9 Add markdown rendering for model description; fixes 2024-10-09 01:49:57 -04:00
Saoud Rizwan
7cb0c524e5 Add OpenRouter custom model scheme 2024-10-09 01:49:57 -04:00
Saoud Rizwan
2de5971adc Add comment 2024-10-09 01:49:56 -04:00
Saoud Rizwan
2ed84244d5 Remove logs 2024-10-09 01:49:55 -04:00