Repository navigation
fix(prompts): say a project secret key works for prompt fetches - #1310
jurajmajerik wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PR overviewNo security issues were found in this pull request. Reviews
|
SDK performance: posthog-pythonBenchmarks completed. No changes flagged for review. Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate. View all results
Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals. Each shard uses its own runner; compare Before PR against With PR within a row, not across shards. Compared 102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in |
💡 Motivation and Context
A user who configures the Python SDK with a project secret API key (
phs_...) and gets a 401 on a prompt fetch reads "a project secret key is not accepted" and switches to a personal key. That has been wrong since November 2026: the prompts API accepts a project secret key with thellm_prompt:readscope, which is the key type the docs now recommend for servers.llm_prompt:readscope works, and where to pass it.personal_api_keyargument docs say both key types are accepted.No behavior changes. The key is sent as before.
💚 How did you test it?
The existing 401 test also asserts the message mentions the project secret API key.
pytest posthog/test/ai/test_prompts.pypasses (84 tests).📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written with Claude Code using Claude Fable 5.1 (
claude-fable-5-1), directed by the assignee. The server-side change that accepts project secret keys for prompt reads is PostHog/posthog#129971. The .NET SDK got the same wording fix in PostHog/posthog-dotnet#377.🤖 Generated with Claude Code