feat: improve request pricing, model diagnostics, and client discovery
- Align response model handling with CPA-Manager-Plus and flag routing mismatches - Add per-request costs and CSV export; fix mixed-context cost aggregation - Display API-reported access types and move providers next to timestamps - Use white table backgrounds and simplify cost and status displays - Expand client discovery paths, validate executables, and prioritize installed clients - Add model, pricing, client discovery, and UI regression tests
This commit is contained in:
1 parent
0e7437493d
commit
dfba9b019f
20 files changed
+652
-152
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { expect, test } from 'bun:test';
|
||||
import { usageProviderDetails } from '../src/services/usageProvider';
|
||||
|
||||
test('usage API authentication distinguishes API routes from OAuth', () => {
|
||||
expect(usageProviderDetails('codex', 'apikey')).toMatchObject({ name: 'Codex', access: 'API' });
|
||||
expect(usageProviderDetails('codex', 'oauth')).toMatchObject({ name: 'Codex', access: 'OAuth' });
|
||||
expect(usageProviderDetails(' My gateway ', 'apikey')).toMatchObject({ name: 'My gateway', access: 'API' });
|
||||
});
|
||||
|
||||
test('missing or new API values are not guessed from model or credentials', () => {
|
||||
expect(usageProviderDetails('codex')).toMatchObject({ name: 'Codex', access: '' });
|
||||
expect(usageProviderDetails('', 'unknown')).toMatchObject({ name: '—', access: '' });
|
||||
expect(usageProviderDetails('custom', 'new-method')).toMatchObject({ name: 'custom', access: 'new-method' });
|
||||
});
|
||||
Reference in new issue
Block a user