Skip to content

Throw error on moderation, fix OpenAI config#1802

Merged
KernelDeimos merged 2 commits intomainfrom
eric/25AL1-fix-openai-config
Oct 22, 2025
Merged

Throw error on moderation, fix OpenAI config#1802
KernelDeimos merged 2 commits intomainfrom
eric/25AL1-fix-openai-config

Conversation

@KernelDeimos
Copy link
Copy Markdown
Contributor

@KernelDeimos KernelDeimos commented Oct 21, 2025

Description here would be redundant - see commit messages which are properly detailed:

I was not able to locate a change causing a configuration regression,
however I do know AI was working in my OSS clone and that I had no
reason to change my AI configuration in my `local.json` file. In any
case, it is clear that configuration was not working as intended.

This commit fixes PuterAIModule which was not enabling OpenAI services
when `openai` was configured within the `services` block, even though
the `services` block configuration is supposed to be the recommended
configuration and the global `openai` config object is supposed to be
deprecated.

This commit also fixes OpenAIImageGenerationService which was not
accepting the current parameter name for the API key (`apiKey`) and
instead only accepted the legacy key (`secret_key`) which created this
interesting problem where using the recommended parameter name would
prevent Puter from booting successfully.
Instead of switching to test mode, which responds with "Lorem Ipsum"
sample output to test the API, throw an appropriate error message for
content moderation failures. This is especially useful when OpenAI's
moderation is way way way way too aggressive as this confuses users.
@KernelDeimos KernelDeimos merged commit 5b16774 into main Oct 22, 2025
4 checks passed
@jelveh jelveh deleted the eric/25AL1-fix-openai-config branch May 1, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant