Skip to content

feat(nacos-prompt): migrate NacosPromptListener to Nacos 3.2.0 AiService API with version/label support#904

Open
Sunrisea wants to merge 1 commit intoagentscope-ai:mainfrom
Sunrisea:feat/nacos-prompt-ai-service-upgrade
Open

feat(nacos-prompt): migrate NacosPromptListener to Nacos 3.2.0 AiService API with version/label support#904
Sunrisea wants to merge 1 commit intoagentscope-ai:mainfrom
Sunrisea:feat/nacos-prompt-ai-service-upgrade

Conversation

@Sunrisea
Copy link
Contributor

AgentScope-Java Version

1.0.9

Description

  • NacosPromptListener: replace ConfigService with AiService, use Prompt.render() for template rendering, subscribe via AbstractNacosPromptListener for hot updates, fix ConcurrentHashMap recursive update bug (computeIfAbsent -> get/putIfAbsent)
  • AgentscopeNacosPromptAutoConfiguration: replace ConfigFactory with AiFactory for bean creation
  • AgentscopeNacosReActAgentAutoConfiguration: pass version/label params to NacosPromptListener.getPrompt()
  • AgentScopeNacosPromptProperties: add version and label fields
  • Bump nacos-client from 3.1.1 to 3.2.0-BETA
  • Update all unit tests to match new API

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

@Sunrisea Sunrisea requested a review from a team March 10, 2026 08:39
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ntscope/core/nacos/prompt/NacosPromptListener.java 97.91% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

… AiService

Migrate NacosPromptListener to use Nacos 3.2.0-BETA native AI/Prompt
management API (AiService) instead of ConfigService, enabling native
prompt versioning, label-based routing, and server-side template rendering.

Key changes:
- NacosPromptListener: replace ConfigService with AiService, use
  Prompt.render() for template rendering, subscribe via
  AbstractNacosPromptListener for hot updates, fix ConcurrentHashMap
  recursive update bug (computeIfAbsent -> get/putIfAbsent)
- AgentscopeNacosPromptAutoConfiguration: replace ConfigFactory with
  AiFactory for bean creation
- AgentscopeNacosReActAgentAutoConfiguration: pass version/label params
  to NacosPromptListener.getPrompt()
- AgentScopeNacosPromptProperties: add version and label fields
- Bump nacos-client from 3.1.1 to 3.2.0-BETA
- Update all unit tests to match new API

Made-with: Cursor
@Sunrisea Sunrisea force-pushed the feat/nacos-prompt-ai-service-upgrade branch from 58bb1b0 to cd63ae8 Compare March 10, 2026 08:50
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