mirror of
https://github.com/stablyai/orca.git
synced 2026-09-25 16:02:38 +00:00
* feat(native-chat): offer Extra high grok effort per model Slice grok's reasoning-effort menu by each model's advertised ceiling so 4.6 can reach xhigh while 4.5 stays at high, and keep the untouched default at high so launch argv does not silently escalate. * fix(grok): parse dashed rows in grok models listing Grok stars only the default model and dashes the rest. A star-only bullet dropped 4.5 from the picker once discovered models were authoritative.
51 lines
2.0 KiB
TypeScript
51 lines
2.0 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { getAgentModelProbeSpec } from './agent-model-probe-spec'
|
|
import { GROK_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-grok'
|
|
import { getCommitMessageAgentSpec, listCommitMessageAgentIds } from './commit-message-agent-spec'
|
|
|
|
describe('getAgentModelProbeSpec', () => {
|
|
it('resolves grok as a discovery-only probe with no static model list', () => {
|
|
const spec = getAgentModelProbeSpec('grok')
|
|
expect(spec).toMatchObject({
|
|
id: 'grok',
|
|
binary: 'grok',
|
|
modelSource: 'dynamic',
|
|
models: [],
|
|
defaultModelId: 'grok-4.6'
|
|
})
|
|
expect(spec?.modelDiscovery).toMatchObject({ binary: 'grok', args: ['models'] })
|
|
})
|
|
|
|
it('wires that probe to the parser that reads a real listing', () => {
|
|
// Pinning binary and args alone would still pass with the wrong parser attached,
|
|
// leaving discovery to publish nothing on every host.
|
|
const parsed = getAgentModelProbeSpec('grok')!.modelDiscovery!.parse(
|
|
'You are logged in with grok.com.\n\nDefault model: grok-4.5\n\nAvailable models:\n * grok-4.5 (default)\n'
|
|
)
|
|
expect(parsed).toEqual([{ id: 'grok-4.5', label: 'Grok 4.5', isDefault: true }])
|
|
})
|
|
|
|
it('keeps the grok probe default in step with the catalog seed', () => {
|
|
expect(getAgentModelProbeSpec('grok')!.defaultModelId).toBe(
|
|
GROK_SESSION_OPTION_CATALOG.models[0].id
|
|
)
|
|
})
|
|
|
|
it('aliases commit-message agents by identity rather than copying them', () => {
|
|
// A lossy adapter here would silently drop fields like
|
|
// `modelDiscovery.stdinPayload` and break Claude discovery.
|
|
for (const id of listCommitMessageAgentIds()) {
|
|
expect(getAgentModelProbeSpec(id)).toBe(getCommitMessageAgentSpec(id))
|
|
}
|
|
})
|
|
|
|
it('keeps grok out of the commit-message registry', () => {
|
|
expect(getCommitMessageAgentSpec('grok')).toBeUndefined()
|
|
expect(listCommitMessageAgentIds()).not.toContain('grok')
|
|
})
|
|
|
|
it('is undefined for an agent in neither registry', () => {
|
|
expect(getAgentModelProbeSpec('aider')).toBeUndefined()
|
|
})
|
|
})
|