Skip to content

Add LLM interface aggregation web extension#1532

Open
kongweiguang wants to merge 2 commits into
agentscope-ai:mainfrom
kongweiguang:llm-interface-aggregation
Open

Add LLM interface aggregation web extension#1532
kongweiguang wants to merge 2 commits into
agentscope-ai:mainfrom
kongweiguang:llm-interface-aggregation

Conversation

@kongweiguang
Copy link
Copy Markdown

Summary

Add a new agentscope-extensions-llm-interfaces-web module and Spring Boot starter that let one AgentScope ReActAgent expose stateless OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages compatible endpoints under /v1.

The existing Chat Completions web extension remains intact. The new module reuses its Chat path and adds protocol adapters for Responses and Anthropic requests, responses, tools, usage, finish reasons, and SSE event streams. It also adds /v1/models, tolerant request parsing for common SDK extra fields, and clear unsupported-feature errors for stateful Responses fields.

Additional fixes

  • Handle Spring Boot 4 request binding by accepting dynamic protocol JSON as Object and normalizing inside the adapter layer.
  • Fix Windows/local full-test compatibility for sandbox find, file URL extension detection, multimodal RAG injection, and local image inputs.
  • Register the new artifacts in extension/starter parents, BOM, all-in-one distribution, installation docs, and a runnable documentation example.

Validation

  • mvn -pl agentscope-extensions/agentscope-extensions-llm-interfaces-web,agentscope-extensions/agentscope-spring-boot-starters/agentscope-llm-interfaces-web-starter -am test
  • mvn spotless:check
  • mvn test
  • Packaged and ran agentscope-examples/documentation/llm-interfaces-web, then verified curl fixtures for /v1/models, /v1/chat/completions, /v1/responses, /v1/messages, Chat [DONE], Responses response.created / response.output_text.delta / response.completed, and Anthropic message_start / content_block_delta / message_delta / message_stop.

References

  • OpenAI Responses API and streaming docs
  • Anthropic Messages and streaming docs
  • nanollm protocol aggregation ideas used only as reference, not as proxy/routing/admin implementation

@kongweiguang kongweiguang requested a review from a team May 29, 2026 18:40
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