Skip to content

Replacement string error on MacOS #1

Description

@celiacheff

I using copilot latest (0.0.360 Commit: ecf9c56b0), I know it's unsupported model but the patch it's working for me, and it could affect others.

When running the script, the replacement string is wrong, and set the lists of regular models in another lise, instead of appending/concat

Would perform 2 replacements:
  1. FROM: oX=["claude-sonnet-4.5","claude-sonnet-4","claude-haiku-4.5","gpt-5","gpt-5.1","gpt-5.1-codex-mini","gpt-5.1-codex"]
     TO:   oX=["["claude-sonnet-4.5"",""claude-sonnet-4"",""claude-haiku-4.5"",""gpt-5"",""gpt-5.1"",""gpt-5.1-codex-mini"",""gpt-5.1-codex"]","gpt-4.1","gpt-4o","gpt-5-mini","grok-code-fast-1","gemini-2.5-pro"]

which leads to

SyntaxError: Unexpected identifier 'claude'
    at compileSourceTextModule (node:internal/modules/esm/utils:351:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:107:18)
    at #translate (node:internal/modules/esm/loader:546:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:593:27)
    at async #link (node:internal/modules/esm/module_job:180:19)

Manually editing the js temporarly fixed the problem for me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions