deepreasoning icon indicating copy to clipboard operation
deepreasoning copied to clipboard

wFix: Change default fetch URL to local backend in chat component

Open cavit99 opened this issue 1 year ago • 2 comments

This commit updates the default fetch URL in frontend/components/chat.tsx from https://api.deepclaude.com to http://127.0.0.1:1337.

Reasoning:

The previous default configuration unintentionally directed API requests to the hosted api.deepclaude.com endpoint, even when users were running the frontend locally. This could lead to users inadvertently sending their API keys to the external server if they used the chat interface without realizing this default setting.

This change ensures that by default, the frontend communicates with the local backend server running on http://127.0.0.1:1337, aligning with the expected behavior for users who are self-hosting the application.

Security Improvement:

By pointing to the local backend by default, this commit reduces the risk of users unintentionally exposing their API keys to an external server.

Users who intend to use the managed api.deepclaude.com API can still manually change the fetch URL, but the default is now correctly configured for local development and self-hosting scenarios.

cavit99 avatar Jan 28 '25 14:01 cavit99

Hello, when I changed the code like you did, I encountered the following problem. Have you encountered it before? How was it resolved? @cavit99

I change code like this: `471 | //const response = await fetch("https://api.deepclaude.com", {

472 | const response = await fetch("http://127.0.0.1:1337", {`

I run frontend like this: npm run dev -- -H 0.0.0.0

Then, meet this problem: TypeError: Failed to fetch

like this: https://github.com/vercel/next.js/issues/49896

KenForever1 avatar Feb 18 '25 13:02 KenForever1

Title: Docs: add ClaudeAPI-compatible provider setup?

Hi DeepClaude team,

Would you be open to documenting ClaudeAPI.com as an optional Claude / Anthropic-compatible or OpenAI-compatible endpoint?

ClaudeAPI supports API Key + Base URL configuration, Claude model calls, compatible interfaces, and billing settlement. If this fits the project, we can contribute a small docs PR with a provider config snippet instead of opening a broad feature request.

Suggested doc angle:

  • Configure API key
  • Configure Base URL
  • Select Claude-compatible model
  • Note that ClaudeAPI can be used as an optional upstream/backup provider

Best, Alina ClaudeAPI.com(www.claudeapi.com)

s01ssqt avatar Jun 04 '26 06:06 s01ssqt