byterover-cli icon indicating copy to clipboard operation
byterover-cli copied to clipboard

Enable Full Cipher Functionality Without Requiring OpenAI API Key for Free Usage with OpenRouter and Gemini

Open Vibhor-choudhary opened this issue 1 year ago • 6 comments

Feature Request: Enable Full Cipher Functionality Without Requiring OpenAI API Key for Free Usage with OpenRouter and Gemini Hello Cipher team,

Thank you for your amazing work on Cipher—it’s a powerful tool enabling agentic memory and AI coding assistance.

The Problem I am trying to set up Cipher to work completely free by using only free LLM providers such as OpenRouter (Kimi K2, Qwen) and Google Gemini, without relying on OpenAI’s paid services.

However, I have encountered the following challenge:

According to official documentation and practical usage, Cipher requires an OPENAI_API_KEY despite wanting to use other providers.

This requirement exists because Cipher uses OpenAI’s API for embeddings (vector conversions for memory/search) mandatorily.

Even when OpenRouter and Gemini API keys are correctly provided for completions, Cipher fails to start or operate properly if an OpenAI API key is not set or if its quota is exceeded.

Attempts to specify alternative providers (OpenRouter or Gemini) for embedding either are unsupported or not available out-of-the-box.

This effectively prevents a true OpenAI-free workflow, limiting users who want zero cost solutions.

Why This Matters Many users want to leverage fully free or open LLM models for completions without incurring charges or needing OpenAI billing.

The current architecture forces use of OpenAI embeddings — a hidden dependency that creates frustrating quota errors.

Community tutorials and videos (e.g., YouTube guide) demonstrate free model usage but do not clarify this embedding limitation clearly.

Having support for alternative embedding providers (OpenRouter, Gemini, or local/self-hosted embeddings) would empower truly free usage and broader adoption.

Request Enable Cipher to support alternative embedding providers beyond OpenAI, ideally OpenRouter, Gemini, or local options.

Provide a configuration option (via .env, cipher.yml, or CLI flags) to explicitly select embedding providers, separate from completion providers.

Allow Cipher to run fully without requiring an OPENAI_API_KEY so free users can build and use persistent memory with only free LLM models.

Update documentation to clearly state current embedding requirements and roadmap plans for no-OpenAI setups.

What I’ve Tried Setting both OPENROUTER_API_KEY and GEMINI_API_KEY in .env as per documentation.

Attempting to run Cipher without OPENAI_API_KEY results in startup errors or failure to perform memory operations.

Testing adding a valid OpenAI API key removes errors, but I want to avoid depending on OpenAI billing.

Looking for flags or config options to disable OpenAI embeddings or switch embedding provider—none found.

Following setup from community videos and latest docs, but embedding requirement persists.

Summary Cipher’s reliance on OpenAI embeddings makes it impossible to use the full memory features in a completely free way via OpenRouter and Gemini. Adjusting this limitation would significantly enhance Cipher’s accessibility and user base.

Thank you for considering this feature and for all your hard work.

Best regards, [Vibhor-choudhary]

Vibhor-choudhary avatar Jul 26 '25 13:07 Vibhor-choudhary

Thank you for your contribution, it will be updated in day. Pleas wait.

billcache avatar Jul 27 '25 05:07 billcache

Hi @Vibhor-choudhary, your request is now completed. The PR is still in review. You can check out branch feat/diverse_embedding to test it first then let me know.

billcache avatar Jul 28 '25 05:07 billcache

Hi @Vibhor-choudhary, the new code is already merged to main. Now you can pull new code and test. Thank you for your contibution

billcache avatar Jul 28 '25 07:07 billcache

Thanks @Vibhor-choudhary for feedback. We've added support for other providers' embedding models, so I'll go ahead and close this issue. Feel free to re-open it if you have any questions.

RyanNg1403 avatar Jul 29 '25 01:07 RyanNg1403

@RyanNg1403 Thank you for the great work. can you include this in the README so its clear how to set it up?

thecyrilcril avatar Jul 31 '25 07:07 thecyrilcril

@RyanNg1403 Thank you for the great work. can you include this in the README so its clear how to set it up?

Hi.

Please can you add support for the Claude Pro / Max Plans so we can take advantage of our Claude plan usage rather than pay via API?

Thanks

Hi @thecyrilcril , we did provide instructions for embedding over here: embedding-config, please check it out. Note that you should keep only one of these embedding options (others should be commented) See here for more info memAgent/cipher.yml

RyanNg1403 avatar Jul 31 '25 08:07 RyanNg1403