ruvnet/ruflo · error
'${oldAPI}' is deprecated since ${mapping.since}. Use '${map
Error message
'${oldAPI}' is deprecated since ${mapping.since}. Use '${mapping.replacement}' instead. What it means
When a call goes through a mapped deprecated API, SDKBridge emits a deprecation once per API; with config.fallbackBehavior set to 'error' that warning becomes a thrown Error instead of an automatic migration, halting the legacy call.
Source
Thrown at v3/@claude-flow/integration/src/sdk-bridge.ts:199
*/
translateDeprecatedAPI(
oldAPI: string,
args: unknown[]
): { newAPI: string; args: unknown[] } | null {
const mapping = DEPRECATED_API_MAP[oldAPI];
if (!mapping) {
return null;
}
// Emit deprecation warning (once per API)
if (!this.deprecationWarnings.has(oldAPI)) {
this.deprecationWarnings.add(oldAPI);
const message = `'${oldAPI}' is deprecated since ${mapping.since}. ` +
`Use '${mapping.replacement}' instead.`;
switch (this.config.fallbackBehavior) {
case 'error':
throw new Error(message);
case 'warn':
console.warn(`[DEPRECATED] ${message}`);
this.emit('deprecation-warning', { oldAPI, mapping });
break;
case 'silent':
// Log but don't warn
break;
}
}
const newArgs = mapping.transformer ? mapping.transformer(args) : args;
return { newAPI: mapping.replacement, args: newArgs };
}
/**
* Wrap an API call with compatibility handling
*/
async wrapAPICall<T>(View on GitHub (pinned to fa13ee4ad6)
Solutions
- Migrate the call: use mapping.replacement (the bridge generates before/after snippets — use them)
- During migration, set fallbackBehavior to 'warn' so legacy calls keep working while you port them; flip to 'error' once the inventory is empty
- Subscribe to the 'deprecation-warning' event to enumerate every legacy call still in use
Example fix
// before
const bridge = new SDKBridge({ fallbackBehavior: 'error' }); // first legacy call throws
await bridge.call('old.api.name', args);
// after
const bridge = new SDKBridge({ fallbackBehavior: 'warn' }); // keep shipping while migrating
await bridge.call('new.api.name', args); // per the mapping's replacement Defensive patterns
Strategy: fallback
Validate before calling
// Inventory legacy usage before enforcing 'error' mode
const legacyCalls = new Set<string>();
bridge.on('deprecation-warning', ({ oldAPI, mapping }) => {
legacyCalls.add(`${oldAPI} -> ${mapping.replacement}`);
});
if (legacyCalls.size > 0) console.warn('still deprecated:', [...legacyCalls]); Try / catch
try {
await bridge.call(api, args);
} catch (e) {
if (e instanceof Error && e.message.includes('is deprecated since')) {
// parse the replacement name from the message and route to it — a migration signal, not a transient fault
}
throw e;
} Prevention
- Run with fallbackBehavior 'warn' in dev to collect the full deprecation inventory
- Gate CI on zero deprecation-warning events before switching to 'error'
- Wrap bridged calls behind your own facade so renames happen in one place
When it happens
Trigger: Invoking any oldAPI present in the bridge's deprecation mapping while fallbackBehavior === 'error' — the first such call for that API throws (the deprecationWarning fires once per API per bridge instance).
Common situations: Upgrading the integration package where fallbackBehavior changed to (or defaulted to) 'error'; CI setups that enforce migration by failing on legacy calls; older code paths still using pre-migration API names.
Related errors
- Pool ${this.id} at maximum capacity (${this.config.maxWorker
- Invalid completion type
- MCP server "${server.name}" returned HTTP ${httpStatus}: ${h
- No endpoints configured. This build requires OpenAI-compatib
- Only 'openai' endpoint type is supported in this build
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/2a10e9e2dbb3c955.
Report an issue: GitHub.