Skip to content

mock-gemini: match real Gemini responses more closely #21

Open

Description

@Lukeluds

Part of #18. Non-blocking review notes from #6 and #7.

  • A missing API key returns 401; real Gemini returns 403 PERMISSION_DENIED.
  • :streamGenerateContent without alt=sse returns SSE; the real API returns a JSON array.
  • GET models/{name} returns the list response instead of a single Model.
  • Fault 429 sets Retry-After, but google-genai reads RetryInfo.retryDelay from error.details; add RetryInfo so backoff tests take the real path.
  • tool_write_path and tool_write_content are not type-checked in POST /_mock/config; reject non-strings with 400, as for slow_delay.

Already confirmed: the scripted write_file arguments (Path, Content, Overwrite) match a real agy request (live Gemini run for #10).

Each fix gets a case in fakes/mock-gemini/selftest.sh. Starts on top of #7 and lands after it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions