@azumag/opencode-rate-limit-fallback 1.63.0 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -0
- package/dist/src/config/Validator.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -240,6 +240,10 @@ export const RateLimitFallback = async ({ client, directory, worktree }) => {
|
|
|
240
240
|
// Handle message.updated events
|
|
241
241
|
if (isMessageUpdatedEvent(event)) {
|
|
242
242
|
const info = event.properties.info;
|
|
243
|
+
// Track model info for all assistant messages (needed to identify current model on session.error)
|
|
244
|
+
if (info?.providerID && info?.modelID && info?.sessionID) {
|
|
245
|
+
fallbackHandler.setSessionModel(info.sessionID, info.providerID, info.modelID);
|
|
246
|
+
}
|
|
243
247
|
if (info?.error && errorPatternRegistry.isRateLimitError(info.error)) {
|
|
244
248
|
// Learn from this error if pattern learning is enabled
|
|
245
249
|
const patternLearner = errorPatternRegistry.getPatternLearner();
|
|
@@ -143,7 +143,7 @@ export class ConfigValidator {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
if (config.retryPolicy.strategy !== undefined) {
|
|
146
|
-
const validStrategies = ['immediate', 'exponential', 'linear', 'custom'];
|
|
146
|
+
const validStrategies = ['immediate', 'exponential', 'linear', 'polynomial', 'custom'];
|
|
147
147
|
if (!validStrategies.includes(config.retryPolicy.strategy)) {
|
|
148
148
|
errors.push({
|
|
149
149
|
path: 'retryPolicy.strategy',
|
package/package.json
CHANGED