Skip to content

goose/providers: add Venice.ai private open-source LLM#2252

Merged
angiejones merged 5 commits intoblock:mainfrom
faces-of-eth:issue-2239-venice-ai
May 13, 2025
Merged

goose/providers: add Venice.ai private open-source LLM#2252
angiejones merged 5 commits intoblock:mainfrom
faces-of-eth:issue-2239-venice-ai

Conversation

@faces-of-eth
Copy link
Contributor

@faces-of-eth faces-of-eth commented Apr 17, 2025

Description

Implements Venice.ai as a new model provider with support for various models including:

  • llama-3.3-70b (65K context)
  • qwen-2.5-coder-32b for code optimization
  • qwen-2.5-vl for vision capabilities
  • Additional specialized models

The implementation includes:

  • Live model list fetching for new model releases
  • Full provider API integration
  • UI configuration settings
  • Improved error handling for model fetching
  • Support for Venice.ai's authentication system

Changes

  • Added Venice.ai provider implementation
  • Updated provider factory to include Venice.ai
  • Added UI components for Venice.ai configuration
  • Improved model fetching and error handling
  • Added Venice.ai models to the hardcoded list

Testing

Tested with multiple Venice.ai models including general purpose models and specialized ones for code and vision tasks.

Closes #2239

Screenshot 2025-04-17 at 3 41 13 PM Screenshot 2025-04-17 at 3 40 09 PM

@faces-of-eth faces-of-eth force-pushed the issue-2239-venice-ai branch 4 times, most recently from d9d4804 to 2dacf93 Compare April 18, 2025 00:02
@faces-of-eth
Copy link
Contributor Author

If any reviewers need an API key to test please DM me!

@lily-de
Copy link
Contributor

lily-de commented Apr 22, 2025

Hey thanks for the contribution -- you don't need to update anything in the ui. Can remove those changes and if you've properly setup the provider metadata in the rust code for Venice AI it will show up as an option

Comment on lines 225 to 241
name: 'VENICE_API_KEY',
is_secret: true,
},
{
name: 'VENICE_HOST',
is_secret: false,
default: 'https://api.venice.ai',
},
{
name: 'VENICE_BASE_PATH',
is_secret: false,
default: 'v1/chat/completions',
},
{
name: 'VENICE_MODELS_PATH',
is_secret: false,
default: 'v1/models',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this stuff should be moved to the rust code and go into Venice AI's provider metadata -- see other providers as an example

Copy link
Contributor Author

@faces-of-eth faces-of-eth Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @lily-de – Removed, cleaned up venice.rs and verified in the UI it still appears as you instructed.

Screenshot 2025-04-23 at 7 57 07 PM

@faces-of-eth faces-of-eth requested a review from lily-de April 24, 2025 03:01
@faces-of-eth
Copy link
Contributor Author

Hi @lily-de pinging for final review!

@faces-of-eth faces-of-eth force-pushed the issue-2239-venice-ai branch from 2c2fc80 to c0e7011 Compare May 9, 2025 19:49
@faces-of-eth
Copy link
Contributor Author

Hi @lily-de

image

@faces-of-eth faces-of-eth changed the title feat(providers): add Venice.ai provider integration goose/providers: add Venice.ai private open-source LLM May 9, 2025
Copy link
Contributor

@lily-de lily-de May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer needed fyi -- if you correctly added provider metadata for Venice (which you did I think) you should see it in the UI (just run-ui). Lmk if you don't

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the approval! Would a different PR cleaning this and the other unnecessary code up be helpful? I was attempting to follow the patterns I saw in the code to be thorough.

@lily-de
Copy link
Contributor

lily-de commented May 9, 2025

LGTM -- no need to remove those changes from hardcoded stuff

@angiejones
Copy link
Collaborator

dang almost there! there's a build error

@michaelneale
Copy link
Collaborator

if you run cargo clippy -- -D warnings or tell goose to run it and fix it should get it over the line

The test_concurrent_extension_writes test was failing due to a race condition
in the config file operations. Multiple threads could read the file
simultaneously, each getting the same initial state, and then overwrite each
other's changes when writing back.

The fix ensures atomicity by:
1. Acquiring an exclusive file lock before reading
2. Holding the lock throughout the entire read-modify-write cycle
3. Using a single file handle for the entire operation

This prevents data loss in concurrent scenarios while maintaining the existing
API contract. The fix is isolated to set_param and doesn't affect the behavior
of other public methods.

Test: test_concurrent_extension_writes now passes consistently
@faces-of-eth
Copy link
Contributor Author

faces-of-eth commented May 13, 2025

@michaelneale @lily-de thank you for the review. There was a race condition in an unrelated test that I've provided a fix for here. This test is also currently failing on the main branch. Ran tests perfectly and works. I also believe it satisfies the original intent of the test.

@faces-of-eth faces-of-eth requested a review from lily-de May 13, 2025 13:38
@angiejones angiejones merged commit e633008 into block:main May 13, 2025
5 of 6 checks passed
lifeizhou-ap added a commit to lifeizhou-ap/goose that referenced this pull request May 14, 2025
* upstream/main:
  chore: fix docs for building goose ffi (block#2485)
  chore(deps): bump ring from 0.17.12 to 0.17.14 (block#2497)
  Allow putting GOOSE_PLANNER_MODEL and GOOSE_PLANNER_PROVIDER to config.yaml (block#2525)
  goose/providers: add Venice.ai private open-source LLM (block#2252)
  Docs: Manually trigger summarization (block#2526)
  allow running `goose run` with no session persistence (block#2517)
  docs: recipe parameters (block#2523)
Kvadratni added a commit that referenced this pull request May 20, 2025
Kvadratni added a commit that referenced this pull request May 21, 2025
Sign up for free to 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.

Add Venice.ai as provider

4 participants