feat: add global device queue and readiness tracking
This commit is contained in:
1 parent
a62ac4aef1
commit
42b8988661
57 files changed
+3606
-716
No files matched your search
@@ -1,4 +1,15 @@
|
||||
import { getUniqueGenericTools } from './tool-formatter.util';
|
||||
import { cleanErrorMessage, getUniqueGenericTools } from './tool-formatter.util';
|
||||
|
||||
describe('cleanErrorMessage', () => {
|
||||
it('removes repeated LLM wrapper labels while preserving the provider reason', () => {
|
||||
expect(cleanErrorMessage('LLM Error: LLM Request Error: 503 model overloaded'))
|
||||
.toBe('503 model overloaded');
|
||||
});
|
||||
|
||||
it('does not present an empty LLM wrapper label as an error reason', () => {
|
||||
expect(cleanErrorMessage('LLM Error:')).toBe('Unknown error');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getUniqueGenericTools retry aggregation', () => {
|
||||
it('groups recoverable LLM retries while preserving every attempt', () => {
|
||||
|
||||
@@ -1022,7 +1022,11 @@ export function cleanErrorMessage(rawError: any): string {
|
||||
.replace(/^Pixel-level validation failed:\s*/i, '')
|
||||
.replace(/^Execution error:\s*/i, '')
|
||||
.replace(/^ServerError:\s*/i, '')
|
||||
// LLM wrappers may add this prefix more than once. It is context, not the
|
||||
// actual provider reason, and an empty prefix must not be shown as though
|
||||
// it were a useful error message.
|
||||
.replace(/^(?:LLM\s+(?:Request\s+)?Error\s*:\s*)+/i, '')
|
||||
.trim();
|
||||
|
||||
return fallback || errorStr;
|
||||
return fallback || 'Unknown error';
|
||||
}
|
||||
Reference in new issue
Block a user