mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Closes #11678 Changes: - `catalog/providers/github-copilot.ts`: add `microsoft-decision-1` as a `typesafe-system-one` classifier (text input, 32768 context, $0.042/M input, Copilot's static headers). - `src/providers/github-copilot.ts`: register the classifier and wrap `typesafeSystemOneApi()` to add `/v1` to the base URL, since Copilot serves `/v1/systemone` and the OAuth login replaces the base URL with the account endpoint. - README and `docs/models.md`: add the model to the classifier tables. Tests: - `test/classifier-models.test.ts`: with an OAuth credential, the request goes to `https://api.enterprise.githubcopilot.com/v1/systemone` with the Copilot headers, and the model stays available although `availableModelIds` lists only chat models. With an API key, it goes to `https://api.individual.githubcopilot.com/v1/systemone`. Both tests fail without the wrapper. - Ran against `api.enterprise.githubcopilot.com` with a Copilot login: bool, choice, and score questions return answers and usage. Co-authored-by: Hongwei Ma <11957602+Marvae@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| api | ||
| auth | ||
| compat | ||
| providers | ||
| utils | ||
| bedrock-provider.ts | ||
| bun-oauth.ts | ||
| cli.ts | ||
| compat.ts | ||
| env-api-keys.ts | ||
| image-models.ts | ||
| images-api-registry.ts | ||
| images.ts | ||
| index.ts | ||
| legacy-api-aliases.ts | ||
| model-catalog.ts | ||
| models-store.ts | ||
| models.generated.ts | ||
| models.ts | ||
| oauth.ts | ||
| session-resources.ts | ||
| telemetry.ts | ||
| types.ts | ||