bytedance / bytedance/trae-agent

openai does not work

Open
#162 8 comments 0 reactions 0 assignees View on GitHub
status/need-triage type/question
Dominant language
Python
Stars
12.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

### What is your question?

I tried to use trae-cli on Windows(MINGW64). Both trae_config.json and export OPENAI_API_KEY was set but it does not work. How can I track this issue? The API key has no issue.

```
OpenAI API call failed: Error code: 401 - {'error': {'message': "You have insufficient permissions for this operation. Missing scopes: api.responses.write. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Member, Owner), and if you're using a restricted API key, that it has the necessary scopes.", 'type': 'invalid_request_error', 'param': None, 'code': None}} will sleep for 12 seconds and will retry.

```

### Additional information that you believe is relevant to this question

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure on Windows with MINGW64 using the reported trae_config.json and OPENAI_API_KEY setup. Trace the CLI's OpenAI request path and verify whether the 401 is caused by the key's required api.responses.write scope. Done means the cause and required configuration or permissions are documented and the request succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.