Skip to content
Source
Sign inSign up
TanStack/schemas

replicate: state the upstream model from an official model's owner #724

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

Showing 2 changed files with 30 additions and 0 deletions.

x
0 of 2 viewed, 2 left
15 additions and 0 deletionssrc/server/providers/adapters/replicate.test.tsModified
View file
@@ -771,6 +771,21 @@
expect(errored?.maxOutput).toBe(64000)
// Hardware-billed community model: no page fetch, no price.
expect(byId.get('prunaai/gpt-oss-120b-fast')?.pricing).toBeUndefined()
+ // An official model's owner names the maker; a community owner does not.
+ expect(errored?.upstream).toEqual({
+ providerNamespace: 'anthropic',
+ rawId: 'claude-sonnet-5',
+ source: {
+ derivation: 'listing',
+ sourceUrl: 'https://api.replicate.com/v1/models',
+ path: 'results[].owner (is_official)',
+ },
+ })
+ expect(byId.get('google/gemini-3-flash')?.upstream).toMatchObject({
+ providerNamespace: 'google',
+ rawId: 'gemini-3-flash',
+ })
+ expect(byId.get('prunaai/gpt-oss-120b-fast')?.upstream).toBeNull()
} finally {
globalThis.fetch = original
15 additions and 0 deletionssrc/server/providers/adapters/replicate.tsModified
View file