Skip to content

Factory Droid: /compress (session compact) fails on Gemini 2.5 via CLIProxyAPI #260

@mikez93

Description

@mikez93

Summary

When using Factory's Droid CLI with Gemini via CLIProxyAPI, attempting to compact a session (/compress / "compact session") fails with an error in the Droid UI, while the same setup works for Anthropic and OpenAI models through the proxy.

Environment

  • Client: Factory Droid CLI (BYOK/custom models)
  • Proxy: CLIProxyAPI (latest v6.x, Gemini CLI OAuth configured and working for normal chat + tools)
  • Model: Gemini 2.5 Flash / gemini-2.5-pro (Gemini CLI OAuth)
  • Config (excerpt from ~/.factory/config.json):
    {
      "custom_models": [
        {
          "model": "gemini-2.5-flash",            // or gemini-2.5-pro
          "base_url": "http://127.0.0.1:8317/v1",
          "api_key": "sk-dummy",
          "provider": "openai"                    // or "anthropic" per docs; repro happens with working config
        }
      ]
    }

Reproduction steps

  1. Start cliproxyapi with Gemini OAuth configured and working (normal chat + tools OK in Droid).
  2. In droid, select the custom Gemini model (e.g. Gemini 2.5 Flash [Proxy] [custom]).
  3. Have a non-trivial session (enough turns that Factory would benefit from compaction).
  4. Run the session compact command in Droid (e.g. /compress / "Compact session").

Actual behavior

  • Droid shows an error instead of compacting the session, e.g.:

    Error: Failed to compact and start a new session

  • The same workflow with Anthropic/OpenAI custom models through CLIProxyAPI compacts successfully.

Expected behavior

  • Session compaction should work when using Gemini models via CLIProxyAPI in Droid, just as it does for Anthropic/OpenAI via the proxy (or at least fail with a clear, proxied error from Gemini explaining what’s unsupported).

Notes

  • Existing issues related to Droid + Gemini (e.g. Gemini + Droid = Bug #123, gemini oauth in droid cli: unknown provider #258) address tool-calling / provider wiring, but I couldn’t find an issue specifically tracking /compress / session compaction behavior for Gemini via CLIProxyAPI.
  • Happy to enable request-log: true and provide the exact HTTP request/response for the compaction call if that would help.

Metadata

Metadata

Assignees

No one assigned

    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