1 parent
a8f689e39c
commit
c340aec110
59 files changed
+1108
-1590
No files matched your search
@@ -20,9 +20,9 @@ function responseStream() {
|
||||
})
|
||||
}
|
||||
|
||||
test('Grok uses Responses and its four efforts without the cache key this gateway rejects', async () => {
|
||||
test('non-GPT Responses models omit the GPT cache key', async () => {
|
||||
const provider = createGeek2APIProvider()
|
||||
const model = provider.getModels().find(model => model.id === 'grok-4.7')
|
||||
const model = { ...provider.getModels().find(model => model.id === 'gpt-6.1-sol'), id: 'other-responses-model', name: 'Other Responses Model' }
|
||||
for (const reasoning of ['low', 'medium', 'high', 'xhigh']) {
|
||||
const requests = []
|
||||
const stream = provider.streamSimple(model, { messages: [{ role: 'user', content: 'Reply with ok', timestamp: 1 }] }, {
|
||||
@@ -44,7 +44,7 @@ test('Grok uses Responses and its four efforts without the cache key this gatewa
|
||||
assert.equal(requests.length, 1)
|
||||
assert.equal(requests[0].url, `${DEFAULT_API_HOST}/v1/responses`)
|
||||
assert.equal(requests[0].key, 'Bearer sk-fixture-only-not-a-real-key')
|
||||
assert.equal(requests[0].body.model, 'grok-4.7')
|
||||
assert.equal(requests[0].body.model, 'other-responses-model')
|
||||
assert.equal(requests[0].body.reasoning.effort, reasoning)
|
||||
assert.equal(requests[0].body.prompt_cache_key, undefined, 'the gateway refuses Grok when this field is present')
|
||||
assert.equal(requests[0].body.prompt_cache_retention, undefined, 'Grok must not receive OpenAI 24h retention')
|
||||
@@ -68,7 +68,7 @@ test('GPT keeps the session cache key its gateway route requires', async () => {
|
||||
test('a future non-GPT Responses model also defaults to omitting the GPT cache key', async () => {
|
||||
const provider = createGeek2APIProvider()
|
||||
// A descriptor from another family catches a Grok-only special case.
|
||||
const model = { ...provider.getModels().find(model => model.id === 'grok-4.7'), id: 'another-responses-model', name: 'Another model' }
|
||||
const model = { ...provider.getModels().find(model => model.id === 'gpt-6.1-sol'), id: 'another-responses-model', name: 'Another model' }
|
||||
let payload
|
||||
const stream = provider.streamSimple(model, { messages: [{ role: 'user', content: 'Reply with ok', timestamp: 1 }] }, {
|
||||
apiKey: 'sk-fixture-only-not-a-real-key', sessionId: 'other-session', reasoning: 'high',
|
||||
|
||||
Reference in new issue
Block a user