Dev.to
7/23/2026

3 Assumptions That Broke Before I Got gpt-oss-120b Working Through the Anthropic SDK
Short summary
A developer documents three assumptions that broke while connecting OpenAI's open-weight gpt-oss-120b model through Sakura AI Engine's free tier using the Anthropic Python SDK. The free tier's credit-card prompt is identity verification, not billing. The Anthropic SDK requires auth_token= instead of api_key= for Bearer-auth endpoints. Response content must be filtered by type rather than indexed directly, as ThinkingBlock objects lack a .text attribute. Each fix is a one-line change.
- •Sakura AI Engine's free tier credit-card prompt is identity verification, not a billing trigger
- •Anthropic SDK needs auth_token= (Bearer auth) instead of api_key= (x-api-key) for Sakura's compatible endpoint
- •Filter resp.content by block type instead of indexing content[0] to avoid ThinkingBlock attribute errors
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



