opencode-gitlab-duo-agentic 0.1.16 → 0.1.17
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/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -298,6 +298,7 @@ async function applyRuntimeConfig(config, directory) {
|
|
|
298
298
|
const models = toModelsConfig(available);
|
|
299
299
|
config.provider[PROVIDER_ID] = {
|
|
300
300
|
...current,
|
|
301
|
+
npm: "opencode-gitlab-duo-agentic",
|
|
301
302
|
whitelist: modelIds,
|
|
302
303
|
options: {
|
|
303
304
|
...options,
|
|
@@ -870,12 +871,13 @@ function readProviderBlock(options) {
|
|
|
870
871
|
function createFallbackProvider(input = {}) {
|
|
871
872
|
const instanceUrl = normalizeInstanceUrl(input.instanceUrl ?? envInstanceUrl());
|
|
872
873
|
const token = text(input.apiKey) ?? text(input.token) ?? process.env.GITLAB_TOKEN ?? process.env.GITLAB_OAUTH_TOKEN ?? "";
|
|
874
|
+
const client = { instanceUrl, token };
|
|
873
875
|
return {
|
|
874
876
|
languageModel(modelId) {
|
|
875
|
-
return new DuoWorkflowModel(modelId,
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
877
|
+
return new DuoWorkflowModel(modelId, client);
|
|
878
|
+
},
|
|
879
|
+
agenticChat(modelId, _options) {
|
|
880
|
+
return new DuoWorkflowModel(modelId, client);
|
|
879
881
|
},
|
|
880
882
|
textEmbeddingModel(modelId) {
|
|
881
883
|
throw new NoSuchModelError({ modelId, modelType: "textEmbeddingModel" });
|