Skip to content

chore: fix api Error when ANTHROPIC_BASE_URL env is empty#35

Open
SinoReimu wants to merge 1 commit intobadlogic:mainfrom
SinoReimu:SinoReimu-fix-api-error
Open

chore: fix api Error when ANTHROPIC_BASE_URL env is empty#35
SinoReimu wants to merge 1 commit intobadlogic:mainfrom
SinoReimu:SinoReimu-fix-api-error

Conversation

@SinoReimu
Copy link
Contributor

Now the cli execution will 100% meet api error if not set ANTHROPIC_BASE_URL. The root cause comes from request-parser.ts#isAnthropicAPI() When ANTHROPIC_BASE_URL from environment variable not set, all request will be blocked and show as this

API Error (Connection error.) · Retrying in 1 seconds… (attempt 1/10)
    ⎿  TypeError (Cannot read properties of undefined (reading 'replace'))

Now the cli execution will 100% meet api error if not set ANTHROPIC_BASE_URL. The root cause comes from request-parser.ts#isAnthropicAPI() 
When ANTHROPIC_BASE_URL from environment variable not set, all request will be blocked and show as this
```
API Error (Connection error.) · Retrying in 1 seconds… (attempt 1/10)
    ⎿  TypeError (Cannot read properties of undefined (reading 'replace'))
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant