You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TypeScript SDK Metaculus class has no way to accept or forward an API token, making authenticated Metaculus API calls impossible from TypeScript. The Python SDK handles this correctly.
Core
core/src/server/exchange-factory.ts:110-114 passes credentials?.apiToken to the MetaculusExchange constructor:
sdks/typescript/pmxt/client.ts:3360-3364 — Metaculus class uses generic ExchangeOptions, no apiToken param.
Because ExchangeOptions has no apiToken and getCredentials() never returns one, the sidecar always receives credentials?.apiToken === undefined and falls back to process.env.METACULUS_API_TOKEN only. There is no programmatic path to pass a token from TypeScript.
Python SDK
sdks/python/pmxt/client.py:329 — base Exchange.__init__ accepts api_token: Optional[str] = None. sdks/python/pmxt/client.py:371 — stores self.api_token = api_token. sdks/python/pmxt/client.py:563-564 — _get_credentials_dict() includes it:
TypeScript SDK users cannot authenticate with Metaculus. Any call requiring authentication silently falls back to the environment variable or fails. The gap is invisible — no error at construction time, failure only surfaces at runtime when the sidecar rejects the unauthenticated request.
Found by automated Core-to-SDK surface coverage audit
Closing as duplicate of #469. Same underlying finding: TypeScript ExchangeOptions is missing the apiToken field, so TypeScript callers cannot pass an API token to Metaculus programmatically. Detailed code path analysis (including the root cause in getCredentials() at client.ts:464–474) has been copied to #469.
Activity
Exchange.__init__hasapi_tokenparameter not present in TypeScriptExchangeOptions#469realfishsam commentedon Jun 28, 2026
Closing as duplicate of #469. Same underlying finding: TypeScript
ExchangeOptionsis missing theapiTokenfield, so TypeScript callers cannot pass an API token to Metaculus programmatically. Detailed code path analysis (including the root cause ingetCredentials()atclient.ts:464–474) has been copied to #469.Generated by Claude Code