@expo/code-review-cli 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -763,20 +763,25 @@ fallback key; `ecr doctor` diagnoses setup.
763
763
  } }
764
764
  ```
765
765
 
766
- - **Meta / Muse Spark 1.2 (public Model API).** Set the default model and any
767
- model-pinned agent frontmatter to `meta/muse-spark-1.2`. ECR supplies the fixed
766
+ - **Meta / Muse Spark 1.3 (public Model API).** Set the default model and any
767
+ model-pinned agent frontmatter to `meta/muse-spark-1.3`. ECR supplies the fixed
768
768
  public Responses endpoint and the `@ai-sdk/openai` adapter; the generic
769
769
  Chat-Completions compatibility adapter is intentionally not used because it
770
770
  loses Muse's reasoning continuity across tool turns. Standard and Contributor
771
771
  model ids are supported.
772
772
 
773
773
  ```jsonc
774
- "model": "meta/muse-spark-1.2",
774
+ "model": "meta/muse-spark-1.3",
775
775
  "auth": { "providers": {
776
776
  "meta": { "mode": "api-key", "tokenEnv": "META_API_KEY" }
777
777
  } }
778
778
  ```
779
779
 
780
+ Standard and Contributor 1.2/1.3 model ids have known capability metadata. Any
781
+ future model explicitly named as `meta/<model>` is still routed to the fixed Meta
782
+ endpoint with neutral metadata, so a renamed family such as `meta/muse-foo` does
783
+ not require an ECR release; Meta validates an unknown id on its first request.
784
+
780
785
  Create the key in the [Meta AI developer portal](https://developer.meta.com/ai/).
781
786
  Locally, export it as `META_API_KEY`. In each review-running workflow, replace
782
787
  the Anthropic credential line with
@@ -10,9 +10,9 @@ import { errorMessage, sleep } from "./util.js";
10
10
  /** Discriminant for the Claude Code CLI engine (see core/claude-code.ts). */
11
11
  export const CLAUDE_CODE_ENGINE = "claude-code";
12
12
  /** Fixed so repo config cannot redirect the Meta credential. */
13
- // @ref LLP 0003#muse-spark-via-meta-model-api [implements] — fixed endpoint and model allowlist
13
+ // @ref LLP 0003#muse-spark-via-meta-model-api [implements] — fixed endpoint, provider routing, and known-model metadata
14
14
  export const META_MODEL_API_BASE_URL = "https://api.meta.ai/v1";
15
- /** Supported public Muse models. Unknown ids remain visible to preflight. */
15
+ /** Known public Muse models. Other explicit `meta/...` ids use neutral metadata. */
16
16
  export const META_MUSE_MODELS = {
17
17
  "muse-spark-1.2": {
18
18
  name: "Muse Spark 1.2",
@@ -44,6 +44,36 @@ export const META_MUSE_MODELS = {
44
44
  include: ["reasoning.encrypted_content"],
45
45
  },
46
46
  },
47
+ "muse-spark-1.3": {
48
+ name: "Muse Spark 1.3",
49
+ reasoning: true,
50
+ limit: { context: 1_048_576, output: 1_048_576 },
51
+ modalities: {
52
+ input: ["text", "image", "pdf", "video"],
53
+ output: ["text"],
54
+ },
55
+ options: {
56
+ store: false,
57
+ reasoningEffort: "high",
58
+ reasoningSummary: "auto",
59
+ include: ["reasoning.encrypted_content"],
60
+ },
61
+ },
62
+ "muse-spark-1.3-contributor": {
63
+ name: "Muse Spark 1.3 Contributor",
64
+ reasoning: true,
65
+ limit: { context: 1_048_576, output: 1_048_576 },
66
+ modalities: {
67
+ input: ["text", "image", "pdf", "video"],
68
+ output: ["text"],
69
+ },
70
+ options: {
71
+ store: false,
72
+ reasoningEffort: "high",
73
+ reasoningSummary: "auto",
74
+ include: ["reasoning.encrypted_content"],
75
+ },
76
+ },
47
77
  };
48
78
  /**
49
79
  * Resolve which engine an agent's pass dispatches to, and (when claude) which
@@ -187,7 +217,19 @@ export function buildOpencodeConfig(config, research) {
187
217
  entry.mode === "api-key" &&
188
218
  entry.tokenEnv &&
189
219
  !entry.upstream) {
190
- // Muse needs the Responses adapter; openai-compatible uses Chat Completions.
220
+ // Meta's Model API uses the Responses adapter; openai-compatible uses Chat
221
+ // Completions. Register every explicitly referenced `meta/…` model so a new
222
+ // Meta family/name does not require an ECR release merely to select the right
223
+ // provider. Known Muse ids get their published capabilities; unknown ids stay
224
+ // neutral and are validated by Meta on their first request.
225
+ const models = {};
226
+ for (const id of referencedModels) {
227
+ const slash = id.indexOf("/");
228
+ if (slash > 0 && id.slice(0, slash) === "meta" && id.length > slash + 1) {
229
+ const model = id.slice(slash + 1);
230
+ models[model] = META_MUSE_MODELS[model] ?? {};
231
+ }
232
+ }
191
233
  provider.meta = {
192
234
  npm: "@ai-sdk/openai",
193
235
  name: "Meta Model API",
@@ -195,7 +237,7 @@ export function buildOpencodeConfig(config, research) {
195
237
  baseURL: META_MODEL_API_BASE_URL,
196
238
  apiKey: `{env:${entry.tokenEnv}}`,
197
239
  },
198
- models: Object.fromEntries(Object.entries(META_MUSE_MODELS).filter(([model]) => referencedModels.includes(`meta/${model}`))),
240
+ models,
199
241
  };
200
242
  continue;
201
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/code-review-cli",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Generic, config-driven AI code reviewer engine. Repos supply their agents via .expo-code-review/.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -87,7 +87,7 @@
87
87
  // "auth": { "mode": "api-key", "provider": "openai", "tokenEnv": "OPENAI_API_KEY" }
88
88
  //
89
89
  // Muse Spark via the public Meta Model API Responses endpoint:
90
- // set models to `meta/muse-spark-1.2` and configure:
90
+ // set models to `meta/muse-spark-1.3` and configure:
91
91
  // "auth": { "providers": {
92
92
  // "meta": { "mode": "api-key", "tokenEnv": "META_API_KEY" }
93
93
  // } }