Skip to content

temporal-spring-ai: README expansion and default-model-name consolidation#2861

Merged
donald-pinckney merged 9 commits intomasterfrom
spring-ai/readme-and-naming
Apr 24, 2026
Merged

temporal-spring-ai: README expansion and default-model-name consolidation#2861
donald-pinckney merged 9 commits intomasterfrom
spring-ai/readme-and-naming

Conversation

@donald-pinckney
Copy link
Copy Markdown
Contributor

What was changed

  • Moved the "default" model-name constant from SpringAiPlugin.DEFAULT_MODEL_NAME to ChatModelTypes.DEFAULT_MODEL_NAME and replaced ChatModelActivityImpl's hard-coded literals with the shared constant. ChatModelTypes is the right home — the activity package already imports it, so this avoids an activity → plugin import direction that would've been a package cycle.
  • README gains four new sections:
    • Migrating from plain Spring AI — a three-row table showing which three substitutions get an existing ChatClient-based service running on Temporal.
    • Activity options and retry behavior — documents the default timeouts / non-retryable classification and the forModel(name, ActivityOptions) escape hatch.
    • Known limitations — streaming, defaultToolContext, child-workflow stubs as tools, the 1 MiB media byte[] cap, and the ChatOptions.copy() constraint that affects ChatClient.defaultOptions users.
    • Observability — pointer to the Temporal Java SDK docs plus a note that TemporalChatClient accepts a Micrometer ObservationRegistry.

Why?

The magic string had already drifted once: SpringAiPlugin.DEFAULT_MODEL_NAME existed but ChatModelActivityImpl kept its own copy of the literal "default". Consolidating prevents the next drift, and moving it to ChatModelTypes keeps package directions sensible.

The README covered quick-start and tool types but left adopters guessing about migration steps, failure modes, and what isn't supported. Each new section answers a question we've seen or anticipate from early users of the plugin.

donald-pinckney and others added 3 commits April 21, 2026 15:57
…eanup

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tion

Moves the "default" model-name constant from SpringAiPlugin to
ChatModelTypes and uses it from both SpringAiPlugin and
ChatModelActivityImpl. Removes the duplicate literal in the activity's
single-arg constructor (which had drifted — the constant existed but
the activity kept its own copy). ChatModelTypes is the logical home:
the activity package already imports it, so hosting the constant there
avoids the activity → plugin import direction that would otherwise be
a package cycle.

README gains four new sections:

- Migrating from plain Spring AI: a three-row table showing which
  three substitutions get an existing ChatClient-based service onto
  Temporal. Matches the integration guide's "easy migration" goal.
- Activity options and retry behavior: documents the default timeouts
  and non-retryable classification, and shows the forModel(name,
  ActivityOptions) escape hatch for custom knobs.
- Known limitations: streaming, defaultToolContext, child-workflow
  stubs as tools, the media byte[] cap, and the ChatOptions.copy()
  constraint that affects ChatClient.defaultOptions users.
- Observability: pointer to the Temporal Java SDK docs plus a note
  that TemporalChatClient accepts a Micrometer ObservationRegistry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Planning scratchpad — not part of the shipped artifact. Removed before merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@donald-pinckney donald-pinckney marked this pull request as ready for review April 22, 2026 19:53
@donald-pinckney donald-pinckney requested a review from a team as a code owner April 22, 2026 19:53
Comment thread temporal-spring-ai/README.md Outdated
Comment thread temporal-spring-ai/README.md Outdated
donald-pinckney and others added 2 commits April 23, 2026 14:52
Co-authored-by: Brian Strauch <brian@brianstrauch.com>
Clarified the limitation regarding streaming support in chatClient.
…d-naming

# Conflicts:
#	temporal-spring-ai/README.md
#	temporal-spring-ai/src/main/java/io/temporal/springai/model/ChatModelTypes.java
@donald-pinckney donald-pinckney enabled auto-merge (squash) April 24, 2026 19:10
@donald-pinckney donald-pinckney merged commit c402f55 into master Apr 24, 2026
18 checks passed
@donald-pinckney donald-pinckney deleted the spring-ai/readme-and-naming branch April 24, 2026 19:32
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.

3 participants