natureco-cli 2.23.7 → 2.23.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.23.7",
3
+ "version": "2.23.9",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "bin": {
6
6
  "natureco": "bin/natureco.js"
@@ -130,7 +130,7 @@ const LANG = {
130
130
  const NATURECO_PROVIDER = {
131
131
  name: 'NatureCo (natureco.me — kendi platformun)',
132
132
  value: 'natureco',
133
- url: 'https://api.natureco.me/v1',
133
+ url: 'https://api.natureco.me',
134
134
  };
135
135
 
136
136
  const PROVIDER_PRESETS = (customLabel) => [
package/src/utils/api.js CHANGED
@@ -428,7 +428,10 @@ function formatToolsForAnthropic() {
428
428
  * Send message to OpenAI-compatible provider (Groq, OpenAI, Together, etc.)
429
429
  */
430
430
  async function sendMessageOpenAICompatible(providerConfig, messages, tools) {
431
- const endpoint = `${providerConfig.url}/chat/completions`;
431
+ const baseUrl = providerConfig.url.replace(/\/+$/, '');
432
+ const endpoint = baseUrl.includes('api.natureco.me')
433
+ ? 'https://api.natureco.me/api/v1/chat/completions'
434
+ : `${baseUrl}/chat/completions`;
432
435
 
433
436
  const requestBody = {
434
437
  model: providerConfig.model,
@@ -868,7 +871,10 @@ async function streamProviderCompletion(providerConfig, messages, tools) {
868
871
  }
869
872
 
870
873
  async function streamOpenAICompletion(providerConfig, messages, tools) {
871
- const endpoint = `${providerConfig.url}/chat/completions`;
874
+ const baseUrl = providerConfig.url.replace(/\/+$/, '');
875
+ const endpoint = baseUrl.includes('api.natureco.me')
876
+ ? 'https://api.natureco.me/api/v1/chat/completions'
877
+ : `${baseUrl}/chat/completions`;
872
878
 
873
879
  const requestBody = {
874
880
  model: providerConfig.model,