feat(web): 支持文档页真实提交请求

This commit is contained in:
2026-07-22 00:24:36 +08:00
parent 6b675c406e
commit b04a7d9d3d
7 changed files with 348 additions and 172 deletions
+11
View File
@@ -36,6 +36,17 @@ describe('ApiDocsPage extended task documentation', () => {
expect(html).toContain('任务取回接口');
});
it('defaults the online runner to test mode and offers an explicit real submission mode', () => {
const html = renderDocs('imageEdit', { kind: 'images.edits', model: 'gpt-image-1', prompt: '移除背景' });
expect(html).toContain('运行模式');
expect(html).toContain('测试模式');
expect(html).toContain('真实提交');
expect(html).toContain('aria-pressed="true"');
expect(html).toContain('"runMode": "simulation"');
expect(html).toContain('"simulation": true');
});
it('documents async mode as a body-independent capability', () => {
const html = renderDocs('asyncMode', { kind: 'chat.completions', model: 'gpt-4o-mini', prompt: '你好' });