Skip to content

Ask AI on docs doesn't work #2382

Open
Open

Description

@PatrykKuniczak

Describe the bug

After very first question:
Image

After second:
Image

Reference:
#2037

Reproduction

  1. Visit docs
  2. Click "Ask AI" button on the right bottom
  3. Type anything and submit

Validations

Activity

  1. added
    pending-triage
    on May 15, 2026
  2. removed
    pending-triage
    on May 15, 2026
  3. smashedr commented on May 15, 2026

    @smashedr
    Contributor

    FWIW: These errors are standard with Gemini free tier, which is what I believe the plugin works with.

  4. PatrykKuniczak commented on May 16, 2026

    @PatrykKuniczak
    CollaboratorAuthor

    @smashedr Each probably you're all right, but maybe @aklinker1 Are able to solve it in some way

  5. smashedr commented on May 16, 2026

    @smashedr
    Contributor

    Both these errors are usually transient depending on the Gemini server workload (503) and the WXT website workload (429).

    In both cases the solution is usually to try again later. You would need a paid API key to prevent these errors.

    That being said, Gemini logs all the usage and errors, so the key owner can validate all this.

  6. aklinker1 commented on May 17, 2026

    @aklinker1
    Member

    I could pay... But people already have their own AI setups, and I don't think this needs to handle any real load. Just people popping in for the first time or an occasional question.

    We already provide context files with the docs (though it ~700,000 tokens last I looked), and have integrations with context7. Newer models also have started to incorporate WXT's docs into their knowledge base, though it's hit or miss.

    I can retry the 503 errors for sure, and try to compress the context more so we hit less 429s. I'm pretty sure we're hitting the tokens per minute rate limit, due to the big context, I'll double check later.

  7. aklinker1 commented on May 17, 2026

    @aklinker1
    Member

    The other option is to use a different AI search provider/chatbot, that was discussed in a different issue maybe?

  8. smashedr commented on May 17, 2026

    @smashedr
    Contributor

    The other option is to use a different AI search provider/chatbot, that was discussed in a different issue maybe?

    Out of curiosity, what other provider/chatbot are you considering using?

  9. aklinker1 commented on May 17, 2026

    @aklinker1
    Member

    Algolia has an integration with VitePress, that would be the easiest, but I've had bad experiences with algolia just not indexing things correctly.

    There's another I can't remember, but you need to request access and I've never heard back from them.

  10. aklinker1 commented on May 17, 2026

    @aklinker1
    Member

    Another approach would be to make vitepress-knowledge smarter, and give it tools for searching the docs and only loading relevant ones, like how AI agents wrote code.

    That would probably be the smart thing to do, keep it free and easy to host, use less tokens.

  11. smashedr commented on May 17, 2026

    @smashedr
    Contributor

    Another approach would be to make vitepress-knowledge smarter, and give it tools for searching the docs and only loading relevant ones, like how AI agents wrote code.
    That would probably be the smart thing to do, keep it free and easy to host, use less tokens.

    That would be, very interesting to see...

    I have quite a few VitePress sites and would also like the ability to use an arbitrary provider/model from claude/openai/gemini.

    I recently setup a simple test action using the ai-sdk.dev which provides a single typescript api for using all of these providers. The user just provides the model and API Key environment variable.
    Reference: https://github.com/cssnr/ai-issue-action

  12. smashedr commented on May 17, 2026

    @smashedr
    Contributor

    Not to hijack this issue, but I did setup a quick test using the ai-sdk chat and was able to get a fully functional VitePress Chat Client and Proxy API Server, both in less than 30 lines of code each. Pretty impressive SDK.

    pwsh-20260516-191251630.mp4
  13. smashedr commented on May 19, 2026

    @smashedr
    Contributor

    @aklinker1 do you want to, and is there somewhere, we can collaborate on this?

    I packaged the secure proxy server into a docker container: https://github.com/cssnr/chat-server
    I packaged the live streaming client into a VitePress plugin: https://github.com/cssnr/vitepress-chat

    The server holds the API key and live streams the API results to the client.
    The client generates instructions from the docs and adds the chat button/box.

    There is a live demo on the client docs: https://cssnr.github.io/vitepress-chat/

  14. aklinker1 commented on Jun 28, 2026

    @aklinker1
    Member

    That's cool! I don't have the bandwidth to keep working on vitepress-knowledge right now, so I'd be willing to switch over to this or another open source tool.

    But this wouldn't solve the rate limit errors - I would still have to start paying, nor would if fix the issues with large context.

  15. smashedr commented on Jun 28, 2026

    @smashedr
    Contributor

    It works with big-pickle free. So that would solve the rate limit issues?

  16. aklinker1 commented on Jun 28, 2026

    @aklinker1
    Member

    Never heard of it before... what's it's context size? WXT's llms-full.txt file is 700k tokens

  17. smashedr commented on Jun 28, 2026

    @smashedr
    Contributor

    Its the same model you get with OpenCode Zen.

    https://opencode.ai/docs/zen/

    The exact limits are not disclosed but it includes quite a bit of usage. But since it is 100% free, it would cost nothing to setup a test...

    Additionally, it would increase the rate limit with paid models like Gemini (including free tier) by utilizing token caching for repeated requests.


    But the easiest thing to do would be to setup a test. I already installed this on 4 different VItePress sites with no issues.
    Let me know if you need any help...

  18. aklinker1 commented on Jun 29, 2026

    @aklinker1
    Member

    I'll come back to this after the major release I'm working on is out, that takes priority right now.

  19. smashedr commented on Jun 30, 2026

    @smashedr
    Contributor

    I'll come back to this after the major release I'm working on is out, that takes priority right now.

    Sure thing, just let me know when your ready and I will gladly help. I did a quick test today and everything is working.

    Image

    Note, the generated llms.txt was 532KB vs the current llms-full.txt which is 611KB.

    Some key points about this library.

    • It is fully modular: Client Chat / Client LLMS Generator / Server
    • I want to make the Chat fully customizable, so any options/features we want can be added there.
    • The LLMS txt generator plugin is very minimal, we can expand it, use another one, or keep using yours...

    I could throw together a PR but a server needs to be hosted somewhere, and that server's hostname would need to be added as an environment variable or hard coded. Could Deploy to Render for one-click testing or easily to any Docker/Node host.

    However, configuring the client was super easy and I had no issues (except vitepress server is not configured to allow all hosts and import.meta.env didnt work out of the box).

  20. aklinker1 commented on Jun 30, 2026

    @aklinker1
    Member

    I have a docker server I self host everything from, it will be easy to setup!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions