Add the harness, envs, per-bot models and chat attachments
- Harness: providers, model catalog synced hourly, automatic free picks, cooldowns, tool loop with context trimming, MCP computer tools - Bots queue runs replies and tasks through the harness; jobs wait (attempt refunded) while every model is resting - Envs: Settings > Environment, scoped general/workspace/computer, written to computers and redacted from tool output - Models: Settings > Models, per-harness provider select defaulting to OpenRouter, and a models modal on each bot's chat (the coordinator's edits the defaults) - Chat: thinking row while a reply runs, file attachments (upload, paste, drop) that replies read as images, audio and document text - Fix media uploads failing after a user's first file, and private files being served from the public media path Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import guessModelModalities from "./guess-model-modalities";
|
||||
|
||||
const outputs = (slug: string) =>
|
||||
guessModelModalities({ slug }).output_modalities;
|
||||
|
||||
describe("guessModelModalities", () => {
|
||||
test("spots speech, transcription, image and embedding models", () => {
|
||||
expect(outputs("whisper-large-v3")).toEqual(["transcription"]);
|
||||
expect(outputs("gpt-4o-mini-transcribe")).toEqual(["transcription"]);
|
||||
expect(outputs("tts-1-hd")).toEqual(["speech"]);
|
||||
expect(outputs("gpt-image-1")).toEqual(["image"]);
|
||||
expect(outputs("dall-e-3")).toEqual(["image"]);
|
||||
expect(outputs("text-embedding-3-small")).toEqual(["embeddings"]);
|
||||
});
|
||||
|
||||
test("takes everything else for a tool-calling chat model", () => {
|
||||
expect(guessModelModalities({ slug: "deepseek-chat" })).toEqual({
|
||||
input_modalities: ["text"],
|
||||
output_modalities: ["text"],
|
||||
supports_tools: true,
|
||||
});
|
||||
expect(outputs("mistral-large-latest")).toEqual(["text"]);
|
||||
});
|
||||
|
||||
test("knows which chat families see images", () => {
|
||||
expect(
|
||||
guessModelModalities({ slug: "claude-sonnet-5-5" }).input_modalities,
|
||||
).toEqual(["text", "image"]);
|
||||
expect(
|
||||
guessModelModalities({ slug: "models/gemini-3.5-flash" })
|
||||
.input_modalities,
|
||||
).toEqual(["text", "image"]);
|
||||
expect(
|
||||
guessModelModalities({ slug: "qwen2.5-vl:7b" }).input_modalities,
|
||||
).toEqual(["text", "image"]);
|
||||
expect(
|
||||
guessModelModalities({ slug: "deepseek-r1:14b" }).input_modalities,
|
||||
).toEqual(["text"]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user