mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 00:17:45 +08:00
Merge pull request #815 from wanzhao-ysy/fix/antigravity-endpoint-default-path
fix(frontend): show Anti Gravity v1internal endpoint path
This commit is contained in:
@@ -69,6 +69,14 @@ describe('endpoint default paths', () => {
|
|||||||
apiFormats,
|
apiFormats,
|
||||||
})).toBe('/v1internal:{action}')
|
})).toBe('/v1internal:{action}')
|
||||||
})
|
})
|
||||||
|
it('uses Anti Gravity v1internal paths for fixed Anti Gravity endpoints', () => {
|
||||||
|
expect(getDefaultEndpointPath({
|
||||||
|
apiFormat: 'gemini:generate_content',
|
||||||
|
providerType: 'antigravity',
|
||||||
|
baseUrl: 'https://daily-cloudcode-pa.googleapis.com',
|
||||||
|
apiFormats,
|
||||||
|
})).toBe('/v1internal:{action}')
|
||||||
|
})
|
||||||
|
|
||||||
it('keeps Codex Responses root path without duplicating /v1', () => {
|
it('keeps Codex Responses root path without duplicating /v1', () => {
|
||||||
expect(getDefaultEndpointPath({
|
expect(getDefaultEndpointPath({
|
||||||
|
|||||||
@@ -182,6 +182,11 @@ export function getDefaultEndpointPath(params: {
|
|||||||
return '/v1internal:{action}'
|
return '/v1internal:{action}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (providerType === 'antigravity') {
|
||||||
|
if (normalizedApiFormat === 'gemini:generate_content') {
|
||||||
|
return '/v1internal:{action}'
|
||||||
|
}
|
||||||
|
}
|
||||||
if (providerType === 'vertex_ai') {
|
if (providerType === 'vertex_ai') {
|
||||||
if (normalizedApiFormat === 'gemini:generate_content') {
|
if (normalizedApiFormat === 'gemini:generate_content') {
|
||||||
return '/v1/projects/{project_id}/locations/{region}/publishers/google/models/{model}:{action}'
|
return '/v1/projects/{project_id}/locations/{region}/publishers/google/models/{model}:{action}'
|
||||||
|
|||||||
Reference in New Issue
Block a user