Repository navigation
feat(opengateway): add Ling 3.0 Tiny :free — Day-0 launch, free until August 13 #2112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8fef811
feat(opengateway): add Ling 3.0 Tiny :free — Day-0 launch, free until…
openclaudeai f805975
test(opengateway): Ling Tiny gateway mapping test + explicit window note
openclaudeai 7c0d6bf
feat(integrations): availableUntil catalog-entry expiry + Tiny lifecy…
openclaudeai 88174af
test(integrations): exact-cutoff + hidden + malformed-date coverage; …
openclaudeai 9e3ac02
fix(model): route static picker entries through the availability filter
openclaudeai 90bfcdd
fix(model): merge raw static entries so expired ones mask cached dupl…
openclaudeai 3e2835b
test(integrations): default-model fallback skips hidden and expired e…
openclaudeai a94b675
test(integrations): release shared mutation lock even if registry res…
openclaudeai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| import { describe, expect, test } from 'bun:test' | ||
|
|
||
| import { | ||
| getCatalogEntriesForRoute, | ||
| getModel, | ||
| getModelsForBrand, | ||
| } from './index.js' | ||
| import { resolveModelRuntimeLimits } from './runtimeMetadata.js' | ||
|
|
||
| // All three sides of the Ling Tiny availability window (availableUntil on | ||
| // the gitlawb-opengateway catalog entry, mirroring the gateway's | ||
| // LING_TINY_FREE_END_ISO = 2026-08-13T10:00:00Z). The cutoff itself is | ||
| // exclusive: at exactly the cutoff instant the entry is already gone. | ||
| const DURING_WINDOW = new Date('2026-08-12T00:00:00Z') | ||
| const AT_CUTOFF = new Date('2026-08-13T10:00:00Z') | ||
| const AFTER_WINDOW = new Date('2026-08-13T10:00:01Z') | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| describe('Ling 3.0 Tiny :free descriptor', () => { | ||
| test('exposes the Tiny capabilities and limits to gateway catalogs', () => { | ||
| const model = getModel('inclusionai/ling-3.0-tiny:free') | ||
|
|
||
| expect(model).toBeDefined() | ||
| expect(model).toMatchObject({ | ||
| id: 'inclusionai/ling-3.0-tiny:free', | ||
| brandId: 'ling', | ||
| classification: ['chat', 'reasoning', 'coding'], | ||
| contextWindow: 262_144, | ||
| maxOutputTokens: 32_768, | ||
| capabilities: { | ||
| supportsVision: false, | ||
| supportsStreaming: true, | ||
| supportsFunctionCalling: true, | ||
| supportsJsonMode: false, | ||
| supportsReasoning: true, | ||
| supportsPreciseTokenCount: false, | ||
| }, | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| }) | ||
| expect(getModelsForBrand('ling').map(m => m.id)).toContain( | ||
| 'inclusionai/ling-3.0-tiny:free', | ||
| ) | ||
|
|
||
| // The gateway entry must map BOTH the wire id (apiName) and the picker | ||
| // descriptor to the :free id — a mismatch would send a different model | ||
| // upstream than the picker advertises. | ||
| const catalogEntry = getCatalogEntriesForRoute( | ||
| 'gitlawb-opengateway', | ||
| DURING_WINDOW, | ||
| ).find(entry => entry.apiName === 'inclusionai/ling-3.0-tiny:free') | ||
| expect(catalogEntry?.id).toBe('opengateway-ling-3.0-tiny-free') | ||
| expect(catalogEntry?.modelDescriptorId).toBe(model?.id) | ||
|
|
||
| expect( | ||
| resolveModelRuntimeLimits({ | ||
| model: 'inclusionai/ling-3.0-tiny:free', | ||
| baseUrl: 'https://opengateway.gitlawb.com/v1', | ||
| processEnv: {}, | ||
| }), | ||
| ).toEqual({ contextWindow: 262_144, maxOutputTokens: 32_768 }) | ||
| }) | ||
|
|
||
| test('availableUntil drops the entry from catalog resolution after the window', () => { | ||
| const during = getCatalogEntriesForRoute('gitlawb-opengateway', DURING_WINDOW) | ||
| expect(during.some(e => e.id === 'opengateway-ling-3.0-tiny-free')).toBe(true) | ||
|
|
||
| // Boundary: at exactly the cutoff instant — and any time after — the | ||
| // picker must not offer the id the gateway now rejects; the entry | ||
| // disappears without a client release. | ||
| const atCutoff = getCatalogEntriesForRoute('gitlawb-opengateway', AT_CUTOFF) | ||
| expect(atCutoff.some(e => e.id === 'opengateway-ling-3.0-tiny-free')).toBe(false) | ||
| const after = getCatalogEntriesForRoute('gitlawb-opengateway', AFTER_WINDOW) | ||
| expect(after.some(e => e.id === 'opengateway-ling-3.0-tiny-free')).toBe(false) | ||
|
|
||
| // Entries without availableUntil are untouched by the filter. | ||
| expect(after.some(e => e.id === 'opengateway-ling-3.0-flash-free')).toBe(true) | ||
| expect(after.length).toBe(during.length - 1) | ||
| }) | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.