Skip to content

Commit 832e745

Browse files
igorcostaAutohand Evolve
andcommitted
Publish Autohand AI in the model catalog
Teach the distribution generator about the first-party provider and verify the bundled Fantail and Moa limits before catalog publication. Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
1 parent deceaef commit 832e745

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

‎.github/scripts/generate-model-catalog.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { readFileSync, writeFileSync } from "node:fs";
44

55
const PROVIDER_DEFAULTS = {
6+
autohandai: { api: "openai-completions", baseUrl: "https://api.autohand.ai/v1", contextWindow: 64000 },
67
openrouter: { api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", contextWindow: 131072 },
78
ollama: { api: "openai-completions", baseUrl: "http://127.0.0.1:11434/v1", contextWindow: 131072 },
89
llamacpp: { api: "openai-completions", baseUrl: "http://127.0.0.1:8080/v1", contextWindow: 131072 },

‎tests/github/modelCatalogDistributionWorkflow.test.ts‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,39 @@ const PUBLISH_WORKFLOW = join(ROOT, ".github/workflows/publish-model-catalog.yml
1818
const ADMIN_WORKFLOW = join(ROOT, ".github/workflows/model-catalog-admin-pr.yml");
1919

2020
describe("model catalog distribution automation", () => {
21+
it("generates the bundled Autohand AI provider catalog", () => {
22+
const directory = mkdtempSync(join(tmpdir(), "autohand-model-distribution-"));
23+
const outputPath = join(directory, "models.json");
24+
25+
try {
26+
execFileSync(process.execPath, [
27+
GENERATOR,
28+
"--catalog",
29+
join(ROOT, "src/providers/models.json"),
30+
"--output",
31+
outputPath,
32+
]);
33+
const catalog = JSON.parse(readFileSync(outputPath, "utf8"));
34+
35+
expect(catalog.autohandai).toEqual({
36+
fantail: expect.objectContaining({
37+
api: "openai-completions",
38+
baseUrl: "https://api.autohand.ai/v1",
39+
contextWindow: 64_000,
40+
maxTokens: 16_000,
41+
provider: "autohandai",
42+
}),
43+
moa: expect.objectContaining({
44+
contextWindow: 1_000_000,
45+
maxTokens: 262_144,
46+
provider: "autohandai",
47+
}),
48+
});
49+
} finally {
50+
rmSync(directory, { recursive: true, force: true });
51+
}
52+
});
53+
2154
it("generates a Pi-compatible keyed catalog from the bundled source", () => {
2255
const directory = mkdtempSync(join(tmpdir(), "autohand-model-distribution-"));
2356
const sourcePath = join(directory, "source.json");

0 commit comments

Comments
 (0)