{"record":{"id":"099e72b143927a80","repo":"Fosowl/agenticSeek","slug":"together-ai-is-not-available-for-local-use-change","errorCode":null,"errorMessage":"Together AI is not available for local use. Change config.ini","messagePattern":"Together AI is not available for local use\\. Change config\\.ini","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"sources/llm_provider.py","lineNumber":313,"sourceCode":"                messages=history,\n            )\n            if response is None:\n                raise Exception(\"Google response is empty.\")\n            thought = response.choices[0].message.content\n            if verbose:\n                print(thought)\n            return thought\n        except Exception as e:\n            raise Exception(f\"GOOGLE API error: {str(e)}\") from e\n\n    def together_fn(self, history, verbose=False):\n        \"\"\"\n        Use together AI for completion\n        \"\"\"\n        from together import Together\n        client = Together(api_key=self.api_key)\n        if self.is_local:\n            raise Exception(\"Together AI is not available for local use. Change config.ini\")\n\n        try:\n            response = client.chat.completions.create(\n                model=self.model,\n                messages=history,\n            )\n            if response is None:\n                raise Exception(\"Together AI response is empty.\")\n            thought = response.choices[0].message.content\n            if verbose:\n                print(thought)\n            return thought\n        except Exception as e:\n            raise Exception(f\"Together AI API error: {str(e)}\") from e\n\n    def deepseek_fn(self, history, verbose=False):\n        \"\"\"\n        Use deepseek api to generate text.","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/Fosowl/agenticSeek/blob/ae57a2357745a9706cb12d0fd76d954c84d166fa/sources/llm_provider.py#L295-L331","documentation":"together_fn() refuses to call Together AI when the provider was configured with a local server (is_local=True). Together AI is a hosted-only service, so the library blocks the call before creating the Together client request. The message points the user to config.ini.","triggerScenarios":"Calling together_fn() (or its provider dispatch) while self.is_local is True — config.ini's together section points at a local server_ip.","commonSituations":"config.ini still has local/ollama server settings from a previous setup, or a shared config copied from a local dev environment while intending to use hosted Together AI.","solutions":["Edit config.ini's together section to remove the local server_ip so is_local becomes False","Set a valid Together AI api_key in config.ini","Switch the provider in config.ini to a genuinely local option if local inference is what you want"],"exampleFix":"// before (config.ini)\n[together]\nserver_ip = http://localhost:8000\n// after\n[together]\napi_key = YOUR_TOGETHER_API_KEY","handlingStrategy":"validation","validationCode":"if provider == \"together\" and is_local:\n    raise RuntimeError(\"Together AI requires the hosted API; fix the [together] section in config.ini\")","typeGuard":null,"tryCatchPattern":"try:\n    thought = provider.together_fn(history)\nexcept Exception as e:\n    logger.error(\"Together unavailable locally: %s\", e)\n    thought = local_model_fn(history)","preventionTips":["Keep hosted provider sections free of local server_ip entries","Validate config.ini at startup per environment","Document which providers are hosted-only in team onboarding"],"tags":["configuration","together-ai","local-server"],"backgroundTag":"provider-not-available-locally","analyzedSha":"ae57a2357745a9706cb12d0fd76d954c84d166fa","analyzedAt":"2026-08-30T02:49:05.834Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}