Skip to content

Commit 14f61a6

Browse files
temporal-spring-ai: remove (Duration, int) factory overloads
Now that forDefault(ActivityOptions) / forModel(String, ActivityOptions) / create(ActivityOptions) exist, the (Duration, int) convenience overloads are asymmetric dead weight — they expose two of N ActivityOptions fields as positional parameters, and callers wanting anything else (heartbeats, task queue, custom retry backoff, ...) have to drop to the ActivityOptions path anyway. Removed pre-release so the API surface is consistent: no-arg → plugin defaults; ActivityOptions arg → caller options. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9bb3866 commit 14f61a6

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

temporal-spring-ai/src/main/java/io/temporal/springai/mcp/ActivityMcpClient.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,6 @@ public static ActivityMcpClient create() {
8383
return create(defaultActivityOptions(DEFAULT_TIMEOUT, DEFAULT_MAX_ATTEMPTS));
8484
}
8585

86-
/**
87-
* Creates an ActivityMcpClient with a custom timeout and attempt count. Other defaults
88-
* (non-retryable error classification) are preserved.
89-
*
90-
* <p><strong>Must be called from workflow code.</strong>
91-
*
92-
* @param timeout the activity start-to-close timeout
93-
* @param maxAttempts the maximum number of retry attempts
94-
* @return a new ActivityMcpClient
95-
*/
96-
public static ActivityMcpClient create(Duration timeout, int maxAttempts) {
97-
return create(defaultActivityOptions(timeout, maxAttempts));
98-
}
99-
10086
/**
10187
* Creates an ActivityMcpClient using the supplied {@link ActivityOptions}. Pass this when you
10288
* need a specific task queue, heartbeat, priority, or custom {@link RetryOptions}. The provided

temporal-spring-ai/src/main/java/io/temporal/springai/model/ActivityChatModel.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,6 @@ public static ActivityChatModel forModel(String modelName) {
137137
return forModel(modelName, defaultActivityOptions(DEFAULT_TIMEOUT, DEFAULT_MAX_ATTEMPTS));
138138
}
139139

140-
/**
141-
* Creates an ActivityChatModel for a specific chat model with a custom timeout and attempt count.
142-
* The remaining defaults (non-retryable error classification) are preserved.
143-
*
144-
* <p><strong>Must be called from workflow code.</strong>
145-
*
146-
* @param modelName the bean name of the chat model, or null for default
147-
* @param timeout the activity start-to-close timeout
148-
* @param maxAttempts the maximum number of retry attempts
149-
* @return an ActivityChatModel for the specified chat model
150-
*/
151-
public static ActivityChatModel forModel(String modelName, Duration timeout, int maxAttempts) {
152-
return forModel(modelName, defaultActivityOptions(timeout, maxAttempts));
153-
}
154-
155140
/**
156141
* Creates an ActivityChatModel for a specific chat model using the supplied {@link
157142
* ActivityOptions}. The provided options are used verbatim — the plugin does not augment the

0 commit comments

Comments
 (0)