Skip to content

Conversation

@salman1993
Copy link
Contributor

@salman1993 salman1993 commented Jul 15, 2025

Changes:

  • bugfix: image content processing
  • remove logic around detecting image path because goose-llm is remote so that doesn't make sense to try and read images based on path
  • add optional request_id that's forwarded to databricks

Error:
The error was in the Databricks provider's image handling code in /src/providers/formats/databricks.rs. Specifically, in the MessageContent::Image handling section:

MessageContent::Image(image) => {
    // Handle direct image content
    content_array.push(json!({
        "type": "image_url",
        "image_url": {
            "url": convert_image(image, image_format)  // ❌ This was the issue
        }
    }));
}

The problem was that convert_image() returns a complete JSON object (not just a URL string), but the code was trying to assign this object to the url field, which should be a string. This caused the API error: "expected a base64-encoded data URL, but got an object instead."

@salman1993 salman1993 requested a review from zhong-sq July 15, 2025 19:36
Copy link

@zhong-sq zhong-sq left a comment

Choose a reason for hiding this comment

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

nice! LGTM!

@salman1993 salman1993 changed the title [goose-llm] fix image content bug [goose-llm] fix image content bug, add optional request_id field Jul 15, 2025
@salman1993 salman1993 merged commit a5d7795 into main Jul 15, 2025
8 checks passed
@salman1993 salman1993 deleted the sm/fix-image-bug branch July 15, 2025 22:06
zanesq added a commit that referenced this pull request Jul 15, 2025
* 'main' of github.com:block/goose:
  chore(release): release version 1.0.36 (#3436)
  [goose-llm] fix image content bug, add optional request_id field (#3439)

# Conflicts:
#	ui/desktop/package-lock.json
#	ui/desktop/package.json
lifeizhou-ap added a commit that referenced this pull request Jul 16, 2025
* main: (54 commits)
  UI update with sidebar and settings tabs (#3288)
  docs: add CLIStreamExtensionInstructions component (#3443)
  chore(release): release version 1.0.36 (#3436)
  [goose-llm] fix image content bug, add optional request_id field (#3439)
  fix: Set include_usage=true for OpenAI streaming (#3441)
  feat: `recipe list` (#2814) (#2815)
  docs: update github mcp config (#3433)
  feat: Implement streaming for OpenAI (#3413)
  fix: improve extension startup error messages with command details (#2694)
  [feat]: improve file search tools to add globsearch / grep tools (#3368)
  docs: typo in guide description (#3429)
  fix: use safe_truncate to truncate charactor (#3263) (#3264)
  fix: convert invalid recipe variable name to raw content (#3420)
  center goose mobile screenshot (#3418)
  docs: model context limit overrides (#3377)
  docs: Subagents (#3402)
  fix: avoid pass encoded empty string to goose run --recipe (#3361)
  ux: alphabetize extensions (#3416)
  fix: message concatenation in server session management (#3412)
  refactor: streamline memory directory management (#3345)
  ...
lifeizhou-ap added a commit that referenced this pull request Jul 16, 2025
* main:
  UI update with sidebar and settings tabs (#3288)
  docs: add CLIStreamExtensionInstructions component (#3443)
  chore(release): release version 1.0.36 (#3436)
  [goose-llm] fix image content bug, add optional request_id field (#3439)
  fix: Set include_usage=true for OpenAI streaming (#3441)
  feat: `recipe list` (#2814) (#2815)
  docs: update github mcp config (#3433)
  feat: Implement streaming for OpenAI (#3413)
  fix: improve extension startup error messages with command details (#2694)
  [feat]: improve file search tools to add globsearch / grep tools (#3368)
  docs: typo in guide description (#3429)
  fix: use safe_truncate to truncate charactor (#3263) (#3264)
s-soroosh pushed a commit to s-soroosh/goose that referenced this pull request Jul 18, 2025
kwsantiago pushed a commit to kwsantiago/goose that referenced this pull request Jul 19, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
atarantino pushed a commit to atarantino/goose that referenced this pull request Aug 5, 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.

3 participants