Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report for "data:" being unrecognized by aider #3129

Closed
emincangencer opened this issue Feb 3, 2025 · 3 comments
Closed

Bug report for "data:" being unrecognized by aider #3129

emincangencer opened this issue Feb 3, 2025 · 3 comments

Comments

@emincangencer
Copy link

Aider version: 0.73.0
Python version: 3.12.8
Platform: Windows-11-10.0.26100-SP0
Python implementation: CPython
Virtual environment: Yes
OS: Windows 11 (64bit)
Git version: git version 2.47.1.windows.2

Aider v0.73.0
Model: gemini/gemini-2.0-flash-thinking-exp with diff edit format
Git repo: .git with 47 files
Repo-map: using 4096 tokens, auto refresh


data: is not processed by aider.

diff> /ask What does "data: {" mean?

It looks like you are asking about the meaning of " {"  in the context of the prisma\seed.ts file, specifically within the prisma.novel.create  
call.
@paulsharratt0
Copy link

paulsharratt0 commented Feb 7, 2025

It looks like something is removing "data:" in gemini flash thinking responses. I don't see any indication of this in the Aider codebase

@paulbatum
Copy link

paulbatum commented Feb 17, 2025

I think it must be something in the aider codebase (or dependencies), because the problem is not reproducible in any other environment.

Steps to reproduce:

  1. Create an empty folder with just a .env file (configured for gemini-2.0-flash)
  2. Navigate into the folder and run aider
Aider v0.74.2
Model: gemini/gemini-2.0-flash with diff edit format
Git repo: none
Repo-map: disabled
  1. Send the command:
 /ask Please respond with just the string `entity_data: #asdf`

Aider responds with:
entity_ #asdf

The issue does not reproduce in the playground, nor via raw API:

POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?
content-type: application/json

{
    "contents": [{
        "parts": [{"text": " Please respond with just the string `entity_data: #asdf`"}]
    }]    
}

Response:

{
      "content": {
        "parts": [
          {
            "text": "entity_data: #asdf\n"
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP",
      "avgLogprobs": -0.00023910652713051865
    }

Does aider have settings for logging the raw API request/response? If yes, I would be happy to enable it to confirm that the raw model response is correct.

@paulbatum
Copy link

OK I debugged aider and noticed that I could not reproduce the issue when I turned streaming off (which I did to make debugging simpler).

So this means we at least have a workaround:
AIDER_STREAM=False

I dug a little more and it seems like its a liteLLM issue. See:
BerriAI/litellm#8143

The above issue points at the problematic code here:
https://github.com/BerriAI/litellm/blob/v1.59.10/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py#L1434

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

No branches or pull requests

3 participants