skip to content
promptdojo
_
[ save your spot ]
[ follow on x ]
Wire the real model — swap fake_llm for the Anthropic SDK shape — step 2 of 9
ch 25 · capstone
2/9
promptdojo
_
›
phase 05 · capstone
›
ch 25 · capstone
lesson 3 of 7 · wire the real model — swap fake_llm for the anthropic sdk shape
step 2 of 9 in this lesson
Five ways to load the API key. Which TWO are production-grade patterns you'd ship?
1
C (os.getenv) and E (getenv with explicit error fallback)
2
B (os.environ bracket) and C (os.getenv)
3
A (hardcoded) and D (manual file parse)
4
C only — E is overengineering
check
Show hint
ch 25 · capstone
2/9
promptdojo
_
›
phase 05 · capstone
›
ch 25 · capstone
lesson 3 of 7 · wire the real model — swap fake_llm for the anthropic sdk shape
step 2 of 9 in this lesson
Five ways to load the API key. Which TWO are production-grade patterns you'd ship?
1
C (os.getenv) and E (getenv with explicit error fallback)
2
B (os.environ bracket) and C (os.getenv)
3
A (hardcoded) and D (manual file parse)
4
C only — E is overengineering
check
Show hint
park a thought