@mcowger/opencode-plexus 1.4.2 → 1.4.5

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -107,11 +107,18 @@ function adjustBaseUrl(baseUrl, preferredApi, anthropicBaseStyle = "root") {
107
107
  function isChatModel(model) {
108
108
  if (!model.id)
109
109
  return false;
110
+ const inputModalities = model.architecture?.input_modalities;
111
+ if (inputModalities !== undefined && inputModalities.length > 0 && !inputModalities.includes("text")) {
112
+ return false;
113
+ }
110
114
  const outputModalities = model.architecture?.output_modalities;
111
115
  if (outputModalities !== undefined && !outputModalities.includes("text"))
112
116
  return false;
113
117
  const modality = model.architecture?.modality;
114
118
  if (modality?.includes("->")) {
119
+ const input = modality.split("->")[0] ?? "";
120
+ if (!input.toLowerCase().includes("text"))
121
+ return false;
115
122
  const output = modality.split("->").at(-1) ?? "";
116
123
  if (!output.toLowerCase().includes("text"))
117
124
  return false;
@@ -784,27 +791,27 @@ var plugin2 = {
784
791
  };
785
792
  var src_default = plugin2;
786
793
  export {
787
- toRuntimeModels,
788
- src_default as default,
789
- buildModels,
790
- REFRESH_TTL_MS,
791
- PlexusProviderPlugin,
792
- PLEXUS_SUPPRESS_MODELS_OPTION,
793
- PLEXUS_REFRESH_COMMAND,
794
- PLEXUS_PROVIDER_NAME,
795
- PLEXUS_PROVIDER_ID,
796
- PLEXUS_PLUGIN_ID,
797
- PLEXUS_LOG_SERVICE,
798
- PLEXUS_BASE_URL_OPTION,
799
- PLACEHOLDER_MODEL_ID,
800
- OPENAI_COMPATIBLE_NPM,
801
- MODELS_FETCH_TIMEOUT_MS,
802
- ENV_SUPPRESS_MODELS,
803
- ENV_SUPPRESSED_MODELS,
804
- ENV_IGNORE_MODELS,
805
- ENV_EXCLUDE_MODELS,
806
- ENV_BASE_URL,
807
- ENV_API_URL,
794
+ CONFIG_HOOK_REFRESH_BUDGET_MS,
808
795
  ENV_API_KEY,
809
- CONFIG_HOOK_REFRESH_BUDGET_MS
796
+ ENV_API_URL,
797
+ ENV_BASE_URL,
798
+ ENV_EXCLUDE_MODELS,
799
+ ENV_IGNORE_MODELS,
800
+ ENV_SUPPRESSED_MODELS,
801
+ ENV_SUPPRESS_MODELS,
802
+ MODELS_FETCH_TIMEOUT_MS,
803
+ OPENAI_COMPATIBLE_NPM,
804
+ PLACEHOLDER_MODEL_ID,
805
+ PLEXUS_BASE_URL_OPTION,
806
+ PLEXUS_LOG_SERVICE,
807
+ PLEXUS_PLUGIN_ID,
808
+ PLEXUS_PROVIDER_ID,
809
+ PLEXUS_PROVIDER_NAME,
810
+ PLEXUS_REFRESH_COMMAND,
811
+ PLEXUS_SUPPRESS_MODELS_OPTION,
812
+ PlexusProviderPlugin,
813
+ REFRESH_TTL_MS,
814
+ buildModels,
815
+ src_default as default,
816
+ toRuntimeModels
810
817
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcowger/opencode-plexus",
3
- "version": "1.4.2",
3
+ "version": "1.4.5",
4
4
  "description": "OpenCode plugin: Plexus provider with dynamic model discovery",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",