test(llm-pi-ai): remove unreachable compat fallback
This commit is contained in:
parent
3ec495f8fa
commit
78fc31d06b
2 changed files with 0 additions and 14 deletions
|
|
@ -356,7 +356,6 @@ export type EveryOfferedFieldIsDocumented = AssertNever<Exclude<OfferedCompatFie
|
|||
*/
|
||||
function configuredCompatEntries(compat: PiAiCompatProfile | undefined): readonly (readonly [string, unknown])[] {
|
||||
return Object.entries(compat ?? {}).flatMap(([field, value]) => {
|
||||
if (value === undefined) return []
|
||||
const empty = typeof value === 'object' && value !== null && !Array.isArray(value)
|
||||
&& Object.keys(value as object).length === 0
|
||||
return empty ? [] : [[field, value] as const]
|
||||
|
|
|
|||
|
|
@ -919,19 +919,6 @@ describe('compat switches', () => {
|
|||
})
|
||||
})
|
||||
|
||||
it('ignores compat entries whose value is undefined', () => {
|
||||
const models = modelsOf({
|
||||
'acme-gateway': {
|
||||
api: 'openai-completions',
|
||||
baseURL: 'https://acme.test',
|
||||
compat: { supportsStore: undefined },
|
||||
models: [{ id: 'acme-a' }],
|
||||
},
|
||||
}, 'acme-gateway')
|
||||
|
||||
expect(models.get('acme-a')?.compat).toBeUndefined()
|
||||
})
|
||||
|
||||
it('rejects a model switch on an unrecognized protocol as having no configurable compat', () => {
|
||||
expect(() => resolveProfiles({
|
||||
'acme-gateway': {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue