Skip to content
Source
Sign inSign up
TanStack/schemas

groq: state the upstream model from the maker prefix in the id #728

Mergedtombeckenhammerged 1 commit intomain fromfeat/718-upstream-groqmerged by tombeckenham View on GitHub

Showing 2 changed files with 32 additions and 0 deletions.

x
0 of 2 viewed, 2 left
23 additions and 0 deletionssrc/server/providers/adapters/groq.test.tsModified
View file
@@ -28,6 +28,29 @@
})
})
​
+describe('groq upstream identity', () => {
+ it('states the maker an id names, and nothing for a bare id', () => {
+ // Ids from the live listing, 2026-11-21.
+ expect(provider.upstreamModelIdentity?.('openai/gpt-oss-120b')).toEqual({
+ providerNamespace: 'openai',
+ rawId: 'gpt-oss-120b',
+ source: {
+ derivation: 'listing',
+ sourceUrl: 'https://api.groq.com/openai/v1/models',
+ path: 'data[].id',
+ },
+ })
+ expect(
+ provider.upstreamModelIdentity?.('meta-llama/llama-prompt-guard-2-86m'),
+ ).toMatchObject({
+ providerNamespace: 'meta-llama',
+ rawId: 'llama-prompt-guard-2-86m',
+ })
+ expect(provider.upstreamModelIdentity?.('whisper-large-v3')).toBeNull()
+ expect(provider.upstreamModelIdentity?.('allam-2-7b')).toBeNull()
+ })
+})