mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-16 00:03:02 +00:00
* feat: run ai evals weekly on current models and post results to a dashboard Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: add current flagship models, a reasoning flag and claude 5.5 defaults Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: never send a reasoning disable claude 5.5 or gpt-6-astra reject, and treat gpt-6 as a reasoning model Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: address review on gpt-6 support, chat completions tools and model metadata Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: leave tiered gpt-6 unpriced and drop the off sentinel on gpt-5 and o-series Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: point the ai_evals readme at the model registry instead of copying it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: encode the reasoning rules as per-family maps with a shared parity fixture Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the chat completions tools rule open-ended past gpt-5.6 and scope the parity fixture Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
2.2 KiB
TypeScript
53 lines
2.2 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
getConfiguredModelContextWindow,
|
|
getEffectiveModelContextWindow,
|
|
usesAnthropicMessagesApi
|
|
} from './modelConfig'
|
|
|
|
describe('workspace context window overrides', () => {
|
|
const overrides = { 'customai:qwen-local': 32_768, 'anthropic:claude-sonnet-5': 200_000 }
|
|
|
|
it('wins over the built-in table and the assumed window for its exact provider:model', () => {
|
|
expect(getEffectiveModelContextWindow('customai', 'qwen-local', overrides)).toBe(32_768)
|
|
expect(getConfiguredModelContextWindow('customai', 'qwen-local', overrides)).toBe(32_768)
|
|
expect(getEffectiveModelContextWindow('anthropic', 'claude-sonnet-5', overrides)).toBe(200_000)
|
|
})
|
|
|
|
it('does not apply to the same model id served by another provider', () => {
|
|
expect(getEffectiveModelContextWindow('openrouter', 'claude-sonnet-5', overrides)).toBe(
|
|
1_000_000
|
|
)
|
|
expect(getConfiguredModelContextWindow('openai', 'qwen-local', overrides)).toBeUndefined()
|
|
expect(getEffectiveModelContextWindow('openai', 'qwen-local', overrides)).toBe(128_000)
|
|
})
|
|
|
|
it('knows the gpt-6 and Claude 5.5 windows, so they do not compact at the assumed one', () => {
|
|
expect(getConfiguredModelContextWindow('openai', 'gpt-6-sol', undefined)).toBe(1_050_000)
|
|
expect(getConfiguredModelContextWindow('anthropic', 'claude-sonnet-5-5', undefined)).toBe(
|
|
1_000_000
|
|
)
|
|
})
|
|
})
|
|
|
|
describe('usesAnthropicMessagesApi', () => {
|
|
it('routes the native Anthropic provider through the Messages API', () => {
|
|
expect(usesAnthropicMessagesApi('anthropic', 'claude-sonnet-5')).toBe(true)
|
|
})
|
|
|
|
it('routes Azure Foundry Claude deployments through the Messages API', () => {
|
|
expect(usesAnthropicMessagesApi('azure_foundry', 'claude-sonnet-5')).toBe(true)
|
|
expect(usesAnthropicMessagesApi('azure_foundry', 'Claude-Opus-4-8')).toBe(true)
|
|
})
|
|
|
|
it('keeps other Azure Foundry models on the OpenAI-compatible path', () => {
|
|
expect(usesAnthropicMessagesApi('azure_foundry', 'gpt-4o')).toBe(false)
|
|
expect(usesAnthropicMessagesApi('azure_foundry', 'DeepSeek-R1')).toBe(false)
|
|
})
|
|
|
|
it('does not affect other providers', () => {
|
|
expect(usesAnthropicMessagesApi('openai', 'gpt-4o')).toBe(false)
|
|
expect(usesAnthropicMessagesApi('azure_openai', 'gpt-4o')).toBe(false)
|
|
})
|
|
})
|