Documentation
¶
Index ¶
- Constants
- Variables
- func BuildAuthorizeURL(pkce PKCE) string
- func ChatGPTAccountIDFromJWT(token string) string
- func ListModels(ctx context.Context, bearer, accountID string) ([]string, error)
- func ResolveClientVersion(ctx context.Context, force bool) string
- func WithChatGPTSubMiddleware(accountID string) option.RequestOption
- type PKCE
- type TokenSet
Constants ¶
View Source
const ( AuthorizeURL = "https://auth.openai.com/oauth/authorize" TokenURL = "https://auth.openai.com/oauth/token" ClientID = "app_EMoamEEZ73f0CkXaXp7hrann" RedirectURI = "http://localhost:1455/auth/callback" Scopes = "openid profile email offline_access api.connectors.read api.connectors.invoke" Originator = "codex_cli_rs" // ClientVersion is the offline fallback; requests resolve npm latest dynamically. ClientVersion = "0.153.3" CallbackAddr = "127.0.0.1:1455" CallbackPath = "/auth/callback" )
Variables ¶
View Source
var ( ChatGPTSubAPIBase = "https://chatgpt.com/backend-api/codex" ChatGPTResponsesURL = "https://chatgpt.com/backend-api/codex/responses" )
View Source
var CodexVersionRegistryURL = "https://registry.npmjs.org/@openai%2Fcodex/latest"
CodexVersionRegistryURL returns metadata for npm's stable latest tag.
Functions ¶
func BuildAuthorizeURL ¶
func ChatGPTAccountIDFromJWT ¶
func ListModels ¶ added in v2026.716.0
func ResolveClientVersion ¶ added in v2026.909.0
ResolveClientVersion checks npm at most once per six hours, unless forced. Registry failures preserve the cached version, or the built-in fallback on first use, and are retried after five minutes. No OAuth credentials go to npm.
func WithChatGPTSubMiddleware ¶
func WithChatGPTSubMiddleware(accountID string) option.RequestOption
Types ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.