Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Ignore SSE comments to support openrouter streaming (#2432)
johnpccdb2ee738bb139
diff --git a/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py b/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.pyindex ae856c5ce98..cf90633aa61 100644--- a/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py+++ b/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py@@ -367,13 +367,16 @@ class OAIAPICompatLargeLanguageModel(_CommonOAI_API_Compat, LargeLanguageModel):for chunk in response.iter_lines(decode_unicode=True, delimiter=delimiter):if chunk:+ #ignore sse comments+ if chunk.startswith(':'):+ continuedecoded_chunk = chunk.strip().lstrip('data: ').lstrip()chunk_json = Nonetry:chunk_json = json.loads(decoded_chunk)# stream endedexcept json.JSONDecodeError as e:- logger.error(f"decoded_chunk error,delimiter={delimiter},decoded_chunk={decoded_chunk}")+ logger.error(f"decoded_chunk error: {e}, delimiter={delimiter}, decoded_chunk={decoded_chunk}")yield create_final_llm_result_chunk(index=chunk_index + 1,message=AssistantPromptMessage(content=""),