Skip to content

AI integration returns "operation completed successfully" but no content is displayed (OpenAI) #1574

@ges244

Description

@ges244

Body:

Hello, I am trying to use the official OpenAI API with my self-hosted AppFlowy Cloud instance, but I'm unable to get a response in the client app.

Current Behavior:
When I use an AI command in the app, it shows the message "operation completed successfully" but no AI-generated text is displayed.

My Environment:

Self-hosted using the latest Docker Compose setup.

Images used: appflowyinc/appflowy_cloud:latest and appflowyinc/appflowy_ai:latest.

Exhaustive Troubleshooting Steps Taken:

I have worked extensively to debug this and can confirm the following:

My OpenAI API key is valid and has billing enabled. A direct curl test to https://api.openai.com/v1/models from inside the ai container returns a 200 OK with the full list of models.

The ai container has perfect network and DNS connectivity to the internet.

My .env file is correctly configured with OPENAI_API_KEY, OPENAI_API_BASE is commented out, and DEFAULT_AI_MODEL is set to gpt-4o to match the client's expectations.

I fixed an initial 502 Bad Gateway error by setting AI_SERVER_HOST=ai in the .env file, which successfully restored communication between the appflowy_cloud and ai services.

The ai service logs show a clean startup and no errors when the request from the app is made.

Conclusion:
All infrastructure, networking, and configuration appear to be correct. The fact that the app receives a "success" status but no content strongly suggests there is an application-level bug in how the ai or appflowy_cloud service parses, handles, or transmits the final payload received from the OpenAI API.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions