chore: merge dev into v2

This commit is contained in:
Aiden Cline 2026-07-06 14:31:36 -05:00
commit 6cd5812ca1
304 changed files with 24678 additions and 4507 deletions

View file

@ -244,7 +244,10 @@ describe("ModelsDevPlugin", () => {
body: {},
})
const anthropicEffortModel = yield* catalog.model.get(ProviderV2.ID.anthropic, ModelV2.ID.make("claude-effort"))
const anthropicEffortModel = yield* catalog.model.get(
ProviderV2.ID.anthropic,
ModelV2.ID.make("claude-effort"),
)
expect(anthropicEffortModel?.variants).toContainEqual({
id: ModelV2.VariantID.make("low"),
settings: { thinking: { type: "adaptive", display: "summarized" }, effort: "low" },

View file

@ -157,6 +157,42 @@ describe("GithubCopilotPlugin", () => {
}),
)
it.effect("uses advertised Copilot endpoint metadata before model ID fallbacks", () =>
Effect.gen(function* () {
const plugin = yield* PluginV2.Service
const aisdk = yield* AISDK.Service
const calls: string[] = []
yield* addPlugin()
yield* aisdk.runLanguage({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("github-copilot"), ModelV2.ID.make("mai-code-1-flash-picker")),
api: {
id: ModelV2.ID.make("mai-code-1-flash-picker"),
type: "aisdk",
package: "test-provider",
settings: { endpoint: "responses" },
},
}),
sdk: fakeSelectorSdk(calls),
options: { endpoint: "responses" },
})
yield* aisdk.runLanguage({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("github-copilot"), ModelV2.ID.make("gpt-5")),
api: {
id: ModelV2.ID.make("gpt-5"),
type: "aisdk",
package: "test-provider",
settings: { endpoint: "chat" },
},
}),
sdk: fakeSelectorSdk(calls),
options: { endpoint: "chat" },
})
expect(calls).toEqual(["responses:mai-code-1-flash-picker", "chat:gpt-5"])
}),
)
it.effect("uses the API model ID when selecting responses or chat", () =>
Effect.gen(function* () {
const plugin = yield* PluginV2.Service