Skip to content

fix: replace Venice custom provider with declarative config#9234

Merged
DOsinga merged 1 commit into
mainfrom
fix/7444-venice-declarative
May 15, 2026
Merged

fix: replace Venice custom provider with declarative config#9234
DOsinga merged 1 commit into
mainfrom
fix/7444-venice-declarative

Conversation

@DOsinga
Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga commented May 14, 2026

Summary

Replaces the 566-line custom Venice provider with a ~25-line declarative JSON config.

Problem

The Venice provider had a buggy hand-rolled message formatter that only converted the first tool response per message into a proper role: tool message. When the assistant made multiple tool calls in one turn, the remaining tool results were silently dropped, causing the upstream API to reject the request with:

tool_use ids were found without tool_result blocks immediately after

Solution

Venice is a standard OpenAI-compatible API (/api/v1/chat/completions). Instead of patching the buggy formatter, this PR deletes the entire custom provider and replaces it with a declarative JSON config that delegates to the existing OpenAiProvider. This:

  • Fixes the bug — the OpenAI format correctly emits one role: tool message per tool response
  • Gains streaming — Venice supports streaming but the custom provider had it hardcoded off
  • Removes hardcoded limits — the old code forced temperature: 0.7 and max_tokens: 2048
  • Gains all future improvements to the OpenAI format automatically (images, thinking, etc.)

What's dropped (cosmetic only)

  • Capability flags appended to model names in the picker (e.g. llama-3.3-70b [cvfsw])
  • Custom error message when selecting a model that doesn't support tools
  • Configurable VENICE_BASE_PATH and VENICE_MODELS_PATH (nobody uses these)

Changes

  • + crates/goose/src/providers/declarative/venice.json — new declarative config
  • - crates/goose/src/providers/venice.rs — deleted (566 lines)
  • ~ crates/goose/src/providers/mod.rs — removed pub mod venice
  • ~ crates/goose/src/providers/init.rs — removed VeniceProvider registration

Fixes #7444

The Venice provider had a buggy hand-rolled message formatter that only
converted the first tool response per message to a proper 'role: tool'
message. When the assistant made multiple tool calls in one turn, the
remaining tool results were silently dropped, causing the upstream API
to reject with 'tool_use ids were found without tool_result blocks'.

Venice is a standard OpenAI-compatible API. Replace the 566-line custom
provider with a declarative JSON config that delegates to the OpenAI
provider, which correctly handles multi-tool responses, streaming,
images, thinking, and all other features.

Fixes #7444

Signed-off-by: Douwe Osinga <douwe@squareup.com>
@DOsinga DOsinga added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit 001dcd7 May 15, 2026
21 of 22 checks passed
@DOsinga DOsinga deleted the fix/7444-venice-declarative branch May 15, 2026 14:45
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.

Request failed: Bad request (400): .. tool_use ids were found without tool_result blocks

2 participants