fix(codex): include required instructions and improve account-id extraction

This commit is contained in:
qiaoborui
2026-02-14 12:48:16 +08:00
parent 7304ab7d33
commit da804a0748
4 changed files with 41 additions and 0 deletions

View File

@@ -359,6 +359,9 @@ func parseTokenResponse(body []byte, provider string) (*AuthCredential, error) {
if accountID := extractAccountID(tokenResp.AccessToken); accountID != "" {
cred.AccountID = accountID
} else if accountID := extractAccountID(tokenResp.IDToken); accountID != "" {
// Recent OpenAI OAuth responses may only include chatgpt_account_id in id_token claims.
cred.AccountID = accountID
}
return cred, nil