update changelog and context default (#1045)

This commit is contained in:
ekko
2026-05-26 19:35:48 +08:00
committed by GitHub
parent 82680f5c0b
commit 42f7b64ffb
17 changed files with 150 additions and 44 deletions
+8 -8
View File
@@ -71,7 +71,7 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
it('does not scan other providers when the configured provider exists without that model', async () => {
@@ -79,7 +79,7 @@ describe('getModelContextLength', () => {
writeModelsCache({
'openai-codex': {
models: {
'gpt-5.4': { limit: { context: 200_000 } },
'gpt-5.4': { limit: { context: 256_000 } },
},
},
openai: {
@@ -91,7 +91,7 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
it('uses the configured provider cache entry when the provider matches', async () => {
@@ -241,7 +241,7 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
it('does not trust custom:name alone when the matched custom provider entry points at an unknown proxy url', async () => {
@@ -256,7 +256,7 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
it('does not fall through to a unique global match after a resolved custom:name provider misses in its scoped cache provider', async () => {
@@ -276,7 +276,7 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
it('allows a unique global model-name fallback for unresolved custom providers', async () => {
@@ -321,7 +321,7 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
it('does not guess across multiple cache providers when a custom provider remains unresolved', async () => {
@@ -341,6 +341,6 @@ describe('getModelContextLength', () => {
const { getModelContextLength } = await loadModelContext()
expect(getModelContextLength()).toBe(200_000)
expect(getModelContextLength()).toBe(256_000)
})
})