Skip to content

feat(extensions): support chat completions API spring web starter#382

Merged
AlbumenJ merged 34 commits intoagentscope-ai:mainfrom
Alexxigang:realgang/feat_spring_web_starter
Jan 5, 2026
Merged

feat(extensions): support chat completions API spring web starter#382
AlbumenJ merged 34 commits intoagentscope-ai:mainfrom
Alexxigang:realgang/feat_spring_web_starter

Conversation

@Alexxigang
Copy link
Contributor

@Alexxigang Alexxigang commented Dec 28, 2025

AgentScope-Java Version

[The version of AgentScope-Java i'm working on: 1.0.7-SNAPSHOT]

Description

[Please describe the background, purpose, changes made, and how to test this PR]
add support for [Feature]: Chat Completions API Spring Web Starter
#219

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@Alexxigang Alexxigang requested a review from a team December 28, 2025 10:23
@cla-assistant
Copy link

cla-assistant bot commented Dec 28, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Alexxigang
❌ ruigangliu.lrg


ruigangliu.lrg seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Dec 28, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a Chat Completions API Spring Web Starter to AgentScope-Java, implementing an OpenAI-compatible HTTP API for chat completions. The implementation includes both streaming (SSE) and non-streaming endpoints, session management, message conversion, and comprehensive test coverage.

Key Changes:

  • New Spring Boot starter module exposing Chat Completions HTTP API endpoints
  • Session-based agent management with in-memory implementation
  • Support for both streaming and non-streaming chat responses
  • Comprehensive unit tests for all components

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
agentscope-spring-boot-starters/pom.xml Adds new chat-completions-web-starter module to parent POM
agentscope-chat-completions-web-starter/pom.xml Defines dependencies for the new starter module
ChatCompletionsController.java REST controller implementing POST endpoints for chat completions
ChatCompletionsStreamingService.java Service handling SSE streaming responses
ChatMessageConverter.java Converts HTTP DTOs to framework message objects
ChatCompletionsResponseBuilder.java Builds response payloads for API responses
InMemorySessionManager.java In-memory session management implementation
ChatCompletionsSessionManager.java Interface for session management
ChatCompletionsWebAutoConfiguration.java Spring Boot auto-configuration for the starter
ChatCompletionsProperties.java Configuration properties for the web starter
API DTOs (ChatMessage.java, ChatCompletionsRequest.java, etc.) Request/response data transfer objects
Test files Comprehensive unit tests for all components
chat-completions-web example Example Spring Boot application demonstrating the starter usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 15 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Alexxigang Alexxigang force-pushed the realgang/feat_spring_web_starter branch from 81d6ec1 to a8ff98c Compare December 31, 2025 01:40
@Alexxigang Alexxigang changed the title Realgang/feat spring web starter feat(extensions): support chat completions API spring web starter Dec 31, 2025
@Alexxigang Alexxigang requested a review from AlbumenJ January 2, 2026 15:40
@AlbumenJ AlbumenJ merged commit 1d0e81d into agentscope-ai:main Jan 5, 2026
3 of 4 checks passed
yaohuitc pushed a commit to yaohuitc/agentscope-java that referenced this pull request Jan 10, 2026
…entscope-ai#382)

## AgentScope-Java Version

[The version of AgentScope-Java i'm working on: 1.0.7-SNAPSHOT]

## Description

[Please describe the background, purpose, changes made, and how to test
this PR]
add support for [Feature]: Chat Completions API Spring Web Starter
[agentscope-ai#219](agentscope-ai#219)

## Checklist

Please check the following items before code is ready to be reviewed.

- [ ]  Code has been formatted with `mvn spotless:apply`
- [ ]  All tests are passing (`mvn test`)
- [ ]  Javadoc comments are complete and follow project conventions
- [ ] Related documentation has been updated (e.g. links, examples,
etc.)
- [ ]  Code is ready for review

---------

Co-authored-by: ruigangliu.lrg <ruigangliu.lrg@alibaba-inc.com>
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.

2 participants